DOS-Programm für Handheld-Geräte



  • Hallo Community!

    Erstmal eine kleine Einleitung: Ich bin absoluter C++-Neuling! Ich habe Erfahrung in VBA, Delphi, Java und Turbo Pascal. Ich hoffe nun auch den Bogen zu C++ schlagen zu können...

    So, zum Problem: Ich entwickel für eine Firma ein System um Stromzähler abzulesen. Die Daten werden in einer Access Datenbank gespeichert und verarbeitet. Klappt alles auch ganz wunderbar. Nun ist es aber soweit, dass die alten Ablesegeräte (auf denen noch CPM lief) durch neuere Geräte ersetzt werden sollen. Auf diesen neuen Geräten läuft DOS. Die Dokumentation ist ganz gut und einige Beispielprogramme sind auch dabei. Mein Problem besteht nun darin Programme für die Geräte zu erstellen. Die Geräte benutzen eine spezielle Library in der die Funktionen wie "Barcode einlesen", "LED an/aus" usw. eingebaut sind. Ich schaffe es einfach nicht den Compiler so einzustellen, dass hinterher eine *.EXE rauskommt. Ich erhalte z.B. folgende Fehlermeldung:
    "Undefined symbol _get_LED in module ....."
    Kommentiere ich die betreffenden Funktionen aus, so läuft der Compiler einwandfrei durch und ich erhalte eine EXE, die hinterher auch auf den Geräten läuft.
    Mein Problem ist jetzt, dass ich nicht weiß, wie ich dem Compiler sage, dass die Funktionen da sind und er sie auch benutzen darf. Unter "Directories" habe ich schon das Include-Verzeichnis, sowie das Lib-Verzeichnis angegeben.
    Als Programm benutze ich Borland Turbo C++ 3.0. Kann ich auch mit den neueren Versionen arbeiten um DOS-Programme zu erstellen?? Ich hätte da noch C++ Builder 6 zur Verfügung, der mir doch deutlich komfortaber erscheint als mein Turbo C++ von 1992...

    Wäre super, wenn mir jemand so ein bißchen Step-by-Step helfen könnte diese Library vernünftig anzusprechen, damit ich endlich anfangen kann mich um die richtigen Probleme zu kümmern...

    Viele Grüße, Chris



  • Doom5000 schrieb:

    Auf diesen neuen Geräten läuft DOS.

    na, so neu können die ja nicht sein 😉

    Doom5000 schrieb:

    Wäre super, wenn mir jemand so ein bißchen Step-by-Step helfen könnte diese Library vernünftig anzusprechen, damit ich endlich anfangen kann mich um die richtigen Probleme zu kümmern...

    frag mal beim hersteller nach ob's ein sdk für die dinger gibt. die beispiele müssen ja irgendwie compilierbar sein. vielleicht geht's ja garnicht mit 'nem pc-compiler?



  • "Undefined symbol _get_LED in module ....."

    da ist sicher eine library dabei. schau mal nach, oder lad sie dir aus dem web.

    du musst sie dazulinken, wenigstens schaut das oben so aus 😉

    viel glück



  • Ein SDK ist nicht dabei. Ich hab schon geschafft ein Mini-Programm zu compilieren, das auch auf dem Gerät lieg. Problem ist "nur" das Ansprechen dieser gerätespezifischen Funktionen wie Barcode scannen usw., die in dieser Lib liegen.



  • du könntest.. mal ganz frech, versuchen, sie über

    pragma

    einzubinden... aber such lieber erstma im netz..

    #pragma comment ( lib, "deinelib.lib" )

    ps: aber wenn du es schon kompiliert hast, bist du da schon drüber.. ?



  • Bei Kompilieren sagt er mir "SUCCESS", aber wenn ich sag "RUN" schmeisst er mir die Fehler raus... Und ich bekomm eben keine EXE...

    Ich zeig Euch jetzt einfach mal die Beispieldateien, um die es geht. Die Library dolphinc.lib gibts auch noch, die stell ich aber hier nicht rein, weil sie zu groß ist. (Reicht das, wenn ich den Pfad zur Lib bei den Directories angebe, oder muss ich mit der noch was machen?? Es gibt verschiedene Libs für die verschiedenen Speichermodelle des Gerätes. Die heißen dann Dolphinc.lib, Dolphins.lib, Dolphinm.lib, usw. Ich hab noch nicht gesehen, wo ich angebe, welche dieser Libs er benutzen soll.)

    Das Hauptprogramm (man kann die eingebauten LEDs ein und ausschalten):

    #include <dos.h>
    #include <stdio.h>
    #include <conio.h>
    #include <ctype.h>
    #include <dolphin.h>
    
    #define BIOS_PORT (*((unsigned char far *)0x4000ad))
    
    int led_test(void)
    {
    	int c;
    	int ledValue;
    	clrscr();
    	       /*1234567890123456780*/
    	printf ("     LED  TEST\n"
    			  "\n"
    		     "Press R/G to toggle\n"
    			  "the red and green\n"
    			  "LEDs ENTER quits\n"
               "\n"
               "Red   --\n"
               "Green --");
    
    	for (;;)
    	{
    		ledValue = get_led();
    
    		gotoxy(10, 7);
    		printf ("%s", (ledValue & 2) ? "ON " : "OFF");
    
    		gotoxy(10, 8);
    		printf ("%s", (ledValue & 1) ? "ON " : "OFF");
    
    		c = getch();
    		c = toupper(c);
    
    		if (c == 'R')
    			ledValue ^= LED_RED;
    		else if (c == 'G')
    			ledValue ^= LED_GREEN;
    		else if (c == '\r')
    			return 0;
    
    		set_led(ledValue);
    	}
    }
    
    main()
    {
    	led_test();
    	return 0;
    }
    

    Die Include-Datei dolphin.h:

    /*
     * $Revision: 14 $
     *
     * $Log: /Dolphin/libsrc/dolphin.h $
     *
     * 14    08/02/2000 DCudzilo: Added support for Xircom\Cisco\Aironet 4800 Radio Card
     *
     * 13    5/13/98 RAO added support for TURBO C compiler
     *
     * 12    8/04/97 1:16p Jdharper
     * Added prototype:
     * void evDrawUserBitMapAbs(struct UserBmp far *,unsigned, unsigned);
     *
     * 11    7/31/97 12:12p Jdharper
     * Renamed the OFF, NORMAL, INVERSE and BLINK macros.  These macros have
     * ICON_ prepended.
     *
     * Added prototypes for:
     *    evStatusLineOn
     *    evStatusLineOff
     *    evStatusLineCheck
     *    evSetIconState
     *    evGetIconState
     *
     * 10    7/30/97 1:34p Jdharper
     * evGetBatteryStatuts was renamed to get_main_bat.
     *
     * 9     7/17/97 3:12p Jdharper
     * Added typedef name for StatusIcon and UserBmp.
     *
     * 8     7/14/97 5:16p Jdharper
     *
     * 7     7/09/97 1:20p Jdharper
     */
    
    #ifndef __DOLPHIN_H
    #define __DOLPHIN_H
    
    #ifndef H2ASH
    #include <time.h> // h2ash won't be able to find this
    #endif
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    #ifndef H2ASH
    
    #define DAPI _cdecl
    
    /* sio_status() RETURN VALUE BIT DEFINITIONS */
    #define RXD		0x01		/* receive data available */
    #define CTS		0x02		/* Clear-To-Send asserted */
    #define RI		0x04		/* Ring-Indicator asserted */
    #define TxD		0x08	   /* transmit data buffers empty @@@bes 7/7/94 */
    #define TXD		0x08	   /* transmit data buffers empty @@@bes 7/7/94 */
    #define TXD_FULL 0x10
    
    /* Typedef's for structures. */
    #ifndef _cplusplus
    typedef struct bios_version bios_version;
    typedef struct StatusIcon StatusIcon;
    typedef struct UserBmp UserBmp;
    #endif
    
    void DAPI clrscr(void);
    void DAPI capture_text(char far * buffer, unsigned col, unsigned row,
    							  unsigned width, unsigned height);
    void DAPI restore_text(const char far * buffer, unsigned col, unsigned row,
    							  unsigned width, unsigned height);
    int DAPI get_cursor(void);
    void DAPI cursor_off(void);
    void DAPI cursor_on(void);
    void DAPI gotoxy(int x, int y);
    void DAPI putpixel(int x, int y, int color);
    unsigned DAPI wherexy(void);
    
    #if !(defined(__TURBOC__) || defined(__BORLANDC__))
    int DAPI wherex(void);
    int DAPI wherey(void);
    #endif
    
    unsigned DAPI get_contrast(void);
    unsigned DAPI set_contrast(unsigned contrast);
    
    void DAPI default_ngetch_hook(char real_char, char base_char, int mode);
    typedef void (* ngetch_hook)(char real_char, char base_char, int mode);
    ngetch_hook DAPI register_ngetch_hook(ngetch_hook hook);
    ngetch_hook DAPI get_ngetch_hook(void);
    
    int waitkey(unsigned t, int mode);
    #define WK_TIMEOUT   0
    #define WK_KEYSTROKE 1
    #define WK_ONKEY     2
    
    int DAPI ngetch(int mode, int nkeydelay);
    void DAPI shift_lock(int mode);
    int DAPI get_shift_lock(void);
    int DAPI is_numeric(void);
    
    int DAPI onbhit(void);
    void DAPI set_led(unsigned int);
    unsigned int DAPI get_led(void);
    
    #define LED_RED 2
    #define LED_GREEN 1
    
    #ifdef __WATCOMC__
    	void delay(unsigned msec);
    #else
    	void DAPI delay(unsigned msec);
    #endif
    
    struct tm;
    int DAPI dtime(struct tm * tm);
    #if !(defined(__TURBOC__) || defined(__BORLANDC__))
    int DAPI stime(struct tm * tm);
    #endif
    unsigned long bios_ticks(void);
    
    /* Speaker */
    #ifdef __WATCOMC__
    	void sound(unsigned frequency);
    	void nosound(void);
    #else
    	void DAPI sound(unsigned frequency);
    	void DAPI nosound(void);
    #endif
    void DAPI beep(void);
    void DAPI buzz(void);
    
    /* Controls LCD's back light */
    void DAPI light_on(void);
    void DAPI light_off(void);
    int  DAPI check_light(void);
    void DAPI light_on_tout(int seconds);
    
    /* Serial I/O */
    int DAPI sio_init(long rate, int data_bits, int parity_bits, int parity_type,
    				  int tout);
    int  DAPI sio_getc(void);
    int  DAPI sio_putc(int ch);
    int  DAPI sio_in(unsigned char *chr_ptr, long rsp_time);
    char DAPI sio_gets(char* strng, int max, int timeout);
    void DAPI sio_puts(const char* strng);
    int  DAPI sio_status(void);
    void DAPI sio_power_on(void);
    void DAPI sio_power_off(void);
    void DAPI sio_rts_enb(void);
    void DAPI sio_rts_dis(void);
    void DAPI sio_flow_ctrl(int);
    int  DAPI sio_get_cts(void);                 /* JY 10/4/01 */
    int  DAPI sio_232(void);                     /* JY 10/26/01 */
    void DAPI sio_port(int);
    
    /* Compute CCITT CRC. */
    unsigned short DAPI crc_ccitt(unsigned short crc, unsigned char b);
    
    /* Ymodem send and receive */
    int DAPI fty_send(const char * file_name, long baud_rate,
    						const char *default_path);
    int DAPI fty_send_batch(unsigned num_files, char * file_names[],
    								long baud_rate, const char *default_path);
    int DAPI fty_receive_batch(unsigned *num_files, char ** file_names[],
    									long baud_rate, const char *default_path);
    int DAPI fty_receive(char *file_name, long baud_rate, const char*default_path);
    
    /* Return codes from fty_xxxxx routines */
    #define FTY_OK                0
    #define FTY_TIMEOUT          -1
    #define FTY_CANCEL           -2
    #define FTY_CRC              -3
    #define FTY_FILE_OPEN        -4
    #define FTY_FILE_IO          -5
    #define FTY_ESCAPE           -6
    #define FTY_FILE_NOT_FOUND   -7
    #define FTY_DISK_FULL        -8
    #define FTY_WRONG_PROTOCOL   -9
    #define FTY_NO_FILE_RECEIVED -10
    
    /* Xmodem send and receive */
    int DAPI ftx_receive(char* file_name, long baud_rate);
    int DAPI ftx_send(char* file_name, long baud_rate);
    
    /* Return codes from read_barcode. */
    #define BARCODE_OK				(0) /*	"Bar code decoded ok" return code */
    #define BARCODE_TIMEOUT			(1) /* Bar code input timeout */
    #define ANY_KEY_PRESSED			(2) /* "Any keyboard key pressed" return code */
    #define TRIGGER_REL				(3) /* "Trigger released" return code */
    #define DECODE_FAILURE          (5)
    #define BARCODE_NODATA			(6) /* no data acquired					*/
    
    #define CODE11                  (1) /* Bar code id no. */
    #define CODE128					(2)
    #define CODE25IL                (3)
    #define CODE39                  (4)
    #define CODE93	   				(5)
    #define CODABAR   				(6)
    #define MSI_PLESSEY				(7)
    #define UPC_EAN					(8)
    #define CODEIATA				(9)  /* cannot be registered through register_barcode */
    
    int DAPI read_barcode(char *usr_buf_ptr, int *usr_str_len_ptr,
    							 int *usr_info_ptr);
    int DAPI register_barcode(int bc_id_no, unsigned int bc_opt,
    								  unsigned int bc_len);
    int DAPI unregister_barcode(int bc_id_no);
    void DAPI set_barcode_options(unsigned int tout, int on_key_opt,
    										int paper_detect_opt);
    int laser_aim(unsigned milliseconds);
    
    /* barcode_redundancy can force read_barcode to read symbol more than once
       to insure a good read on symbologies that do not have robust check sums. */
    int barcode_redundancy(int rlevel); /* rlevel = 0,1,2.. for 0,1,2.. redundant reads. The default is 0 */
    
    /* 	Specific Register Functions.
    	There are two ways a developer can register a barcode function.
    	1: register_barcode()
    	2: Use the register_xxx functions below.
    
       Register_barcode() causes all symbologies to be linked into the
       application. The following functions allow registration of a specific
       bar-code symbology without using register_barcode(). The bc_opt and bc_len
       arguments work the same as in the register_barcode() function.
       By using only the register functions below, code size can be reduced
       by about 12K.
    */
    int DAPI register_39(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_39(void);
    
    int DAPI register_128(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_128(void);
    
    int DAPI register_25il(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_25il(void);
    
    int DAPI register_11(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_11(void);
    
    int DAPI register_upc(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_upc(void);
    
    int DAPI register_93(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_93(void);
    
    int DAPI register_codabar(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_codabar(void);
    
    int DAPI register_msi(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_msi(void);
    
    /* iata symbology can only be registered through these routines */
    int DAPI register_iata(unsigned int bc_opt, unsigned int bc_len);
    void DAPI unregister_iata(void);
    
    int DAPI get_main_bat(int *, int *);
    int DAPI dolphin_check(void);
    int DAPI homebase(void);
    
    void DAPI dsleep(void);
    void DAPI lpstop(void);
    
    #define	ICON_HI			(8)	/* Status Icon stored in an 8 pixel high array */
    #define	ICON_WIDE		(2)	/* by 2 bytes wide */
    
    #define	ICON_OFF			(0)	/* used to determine the state of the icons */
    #define	ICON_NORMAL		(1)
    #define	ICON_INVERSE	(2)
    #define	ICON_BLINK		(3)
    
    struct StatusIcon
    {
    	/* Format is 8 bits high X 16 bits(2 bytes) wide */
    	unsigned char Pattern[ICON_HI][ICON_WIDE];
    	unsigned char DisplayStatus;	/* 00 = off */
    	                              /* 01=normal */
    	                              /* 02=inverse video */
    	                              /* 03=blinking */
    	unsigned int Value;				/* programmers choice */
    };
    
    struct UserBmp
    {
    	unsigned char BmpPixelsHigh;	   /* Height of the image in Pixels */
    	unsigned char BmpPixelsWide;	   /* Width of the image in Pixels */
    	/* MAX HEIGHT=73, MAX WIDTH = 15, This is the .BMP image */
    	unsigned char Pattern[73][15];
    	unsigned char DisplayStatus;	/* 00 = off */
    	                              /* 01=normal */
    	                              /* 02=inverse video */
    	unsigned int Value;				/* programmers choice */
    };
    
    /* Enhanced video function prototypes. */
    void DAPI evRefreshScreen(void);
    int DAPI evRegisterStatusIcon(int ,struct StatusIcon far *,unsigned);
    void DAPI evDrawUserBitMap(struct UserBmp far *,unsigned, unsigned);
    void DAPI evDrawUserBitMapAbs(struct UserBmp far *,unsigned, unsigned);
    void DAPI evSetScrollRegion(unsigned, unsigned);
    void DAPI evGetScrollRegion(unsigned *, unsigned *);
    void DAPI evSetCursorSize(unsigned, unsigned);
    void DAPI evCursorOn(unsigned);
    void DAPI evGetCursorSize(unsigned *, unsigned *);
    int DAPI evGetPixel(unsigned, unsigned);
    int DAPI evPutGraphicsByte(unsigned, unsigned, unsigned);
    int DAPI evPutGraphicsByteAbs(unsigned, unsigned, unsigned);
    int DAPI evPutPixel(unsigned, unsigned, unsigned);
    int DAPI evWriteCharAbs(unsigned, unsigned, int, unsigned);
    int DAPI evWriteStringAbs(unsigned, unsigned, char far *, unsigned);
    int DAPI evWriteCharInverse(unsigned, unsigned, int);
    void DAPI evLoadDefaultFont(void);
    void DAPI evLoadUserFont(void far *);
    void DAPI evLoadUserCharacter(void far *, unsigned);
    void DAPI evClearAll(void);
    int DAPI evEvsLoaded(void);
    void DAPI evStatusLineOn(void);
    void DAPI evStatusLineOff(void);
    int DAPI evStatusLineCheck(void);
    void DAPI evSetIconState(struct StatusIcon far *icon, unsigned state);
    int DAPI evGetIconState(struct StatusIcon far *icon);
    
    /* Low Level Routine for Setting IR Crystal Chip */
    
    int far DAPI SetCrystalRegister(unsigned char RegisterNum,
    										  unsigned char Value);
    
    /* Non Volatile Memory area */
    int DAPI nv_write(int offset, int length, void *pdata);
    int DAPI nv_read(int offset, int length, void *pdata)  ;
    
    /* Serial Number Routine */
    char * DAPI get_serial(void);
    
    /* key reboot enable - disable routines */
    void DAPI disable_reboot(void);
    void DAPI enable_reboot(void);
    
    /* Enabling base band IR support for POSTAL Applications */
    void DAPI enable_baseband(void);
    
    /* Retrieves the BIOS and Xilinx version information. */
    void DAPI get_bios_version(struct bios_version * bv);
    
    /****
    *	The following are RF Dolphin specific
    ****/
    
    /*
     * Do not use the following Uxx or RF_xxxxx macros in your application.  They
     * may be removed in future releases of this header file.
     */
    
    #ifndef U16
    	#define U16 unsigned int
    #endif
    
    #ifndef U8
    	#define	U8	unsigned char
    #endif
    
    #ifndef U32
    	#define U32 unsigned long
    #endif
    
    #ifdef _MSC_VER
    	#pragma pack(1)  /* Byte align everything. */
    #endif
    
    /*********
    *	Structure for OEM call back info structure. This struct is filled by the
    *	Proxim radio (MAC LAYER) firmware.
    *********/
    typedef struct OEMINFO{
    	char far * SyncFlag;		/* True or False Flag */
    	char far * ROMver;			/* The proxim ROM version */
    	char far * LinkQual;		/* 0=NOT CONNECTED, 1=MARGINAL, 2=GOOD */
    }OEMINFO;
    
    /*********
    *	Structure for Proxim Radio configuration info
    *********/
    typedef struct CONFIGINFO{
    	U8 IRQNum;						/* Offset 0 */
    	U8 Domain;						/* Offset 1 */
    	U8 Channel;						/* Offset 2 */
    	U8 SubChannel;					/* Offset 3 */
    	U8 NodeType;					/* Offset 4 */
    	U16 Port;						/* Offset 5 */
    	U16 InactivityTime;				/* Offset 7 */
    	char MasterName[12];			/* Offset 9 */
    	unsigned char NodeAddress[6];	/* Offset 21 */
    	U8 SocketNumber;				/* Offset 27 (NA with ODI) */
    	U8 Int386Flag;					/* Offset 28 (NA with ODI) */
        U16 MemAddress;                 /* Offset 29 (NA with ODI) */
    	U8 SniffTime;					/* Offset 31 */
    }CONFIGINFO;
    
    /*********
    *	Structure for Aironet Cababilities RID info (dhc)
    *********/
    typedef struct CAP_RID_INFO{
        unsigned int CapLen;                /* Offset 0x0000 */
        unsigned char CapOUI[4];            /* Offset 0x0002 <-- fourth byte always zero */
        unsigned int CapProdNum;            /* Offset 0x0006 */
        unsigned char CapManufName[32];     /* Offset 0x0008 */
        unsigned char CapProdName[16];      /* Offset 0x0028 */
        unsigned char CapProdVer[8];        /* Offset 0x0038 */
        unsigned char CapOEMAddr[6];        /* Offset 0x0040 */
        unsigned char CapAWCAddr[6];        /* Offset 0x0046 */
        unsigned int CapRadioType;          /* Offset 0x004C */
        unsigned int CapRegDomain;          /* Offset 0x004E */
        unsigned char CapCallID[6];         /* Offset 0x0050 */
        unsigned char CapSupportedRates[8]; /* Offset 0x0056 */
        unsigned char CapRxDiversity ;      /* Offset 0x005E */
        unsigned char CapTxDiversity;       /* Offset 0x005F */
        unsigned int CapTxPowerLevel[8];    /* Offset 0x0060 */
        unsigned int CapHwVer;              /* Offset 0x0070 */
        unsigned int CapHwCap;              /* Offset 0x0072 */
        unsigned int CapTempRange;          /* Offset 0x0074 */
        unsigned int CapSwVer;              /* Offset 0x0076 */
        unsigned int CapSwSubVer;           /* Offset 0x0078 */
        unsigned int CapIntfVer;            /* Offset 0x007A */
        unsigned int CapSwCap;              /* Offset 0x007C */
        unsigned int CapBootBlkVer;         /* Offset 0x007E */
        unsigned int CapRequiredHwSupport ; /* Offset 0x0080 */
    }CAP_RID_INFO;
    
    /*********
    *	Structure for Aironet Status RID info (dhc)
    *********/
    typedef struct STATUS_RID_INFO{
        unsigned int StatusLen;               /* Offset 0x0000 */
        unsigned char StatusMacAddress[6];    /* Offset 0x0002 */
        unsigned int StatusOperationalMode;   /* Offset 0x0008 */
        unsigned int StatusErrorCode;         /* Offset 0x000A */
        unsigned int StatusCurSignalStrength; /* Offset 0x000C */
        unsigned int StatusSSIDLength;        /* Offset 0x000E */
        unsigned char StatusSSID[32];         /* Offset 0x0010 */
        unsigned char StatusApName[16];       /* Offset 0x0030 */
        unsigned char StatusCurrentBssid[6];  /* Offset 0x0040 */
        unsigned char StatusPrevBssid1[6];    /* Offset 0x0046 */
        unsigned char StatusPrevBssid2[6];    /* Offset 0x004C */
        unsigned char StatusPrevBssid3[6];    /* Offset 0x0052 */
        unsigned int StatusBeaconPeriod ;     /* Offset 0x0058 */
        unsigned int StatusDtimPeriod ;       /* Offset 0x005A */
        unsigned int StatusAtimDuration;      /* Offset 0x005C */
        unsigned int StatusHopPeriod ;        /* Offset 0x005E */
        unsigned int StatusHopSet ;           /* Offset 0x0060  <-- DSChannel if DS radio */
        unsigned int StatusHopPattern ;       /* Offset 0x0062 */
        unsigned int StatusHopsToBackbone;    /* Offset 0x0064 */
        unsigned int StatusApTotalLoad ;      /* Offset 0x0066 */
        unsigned int StatusOurGenLoad;        /* Offset 0x0068 */
        unsigned int StatusAccumArl ;         /* Offset 0x006A */
        unsigned int StatusSignalQuality;     /* Offset 0x006C */
        unsigned int StatusCurrentTxRate;     /* Offset 0x006E */
        unsigned int StatusApDevice;          /* Offset 0x0070 */
        unsigned int StatusNormalizedRSSI;    /* Offset 0x0072 */
    } STATUS_RID_INFO;
    
    typedef struct PCTCP_INI_INFO{
    	unsigned char Package[64];		/* [Package Section SubSection] */
    	unsigned char Section[64];
    	unsigned char SubSection[64];
    	unsigned char LabelName[64];	/* LabelName-This = Info */
    	unsigned char Info[64];
    }PCTCP_INI_INFO;
    
    typedef struct BATTERY_DATA{
    	U8 Type;
    	long SerialNo;
    	int	Capacity;
    	U8 CorrectionFactor;
    	U16 CurrentCharge;
    	U16 UserData;
    }BATTERY_DATA;
    
    #ifdef _MSC_VER
    	#pragma pack()  /* Return to normal packing. */
    #endif
    
    /****************************
    *	void get_BATTERY_DATA(struct BATTERY_DATA far * BattInfo)
    *	Purpose:	Reads the DS2434 to determine battery info
    *	Arguments:	A pointer to a BATTERY_DATA structure
    *	Returns:	N/A
    *****************************/
    extern void DAPI get_BATTERY_DATA(BATTERY_DATA far * BattInfo);
    /****************************
    *	int write_user_batt_data(U16 Data)
    *	Purpose:	writes a 16 bit value into the NVM of the battery
    *	Arguments:	The 16 bits of data
    *	Returns:	 1 = success
    *				-1 = Unable to unlock the NVM
    *				-2 = Unable to write the NVM
    *****************************/
    extern int DAPI write_user_batt_data(U16 Data);
    
    /****************************
    *	int far RF_AreDriversLoaded(void)
    *	Purpose: This routine is used to verify that the RF drivers are loaded
    *	Arguments:	None
    *   Returns: 1 == Proxim Driver Loaded, 2 == Aironet Driver Loaded, 0 = drivers NOT loaded (dhc)
    *****************************/
    extern int far DAPI RF_AreDriversLoaded(void);
    
    /****************************
    *	int far RF_GetLinkStatus(OEMINFO far * OemInfo)
    *   Purpose: This routine is used to retrieve the Proxim radio performance info (dhc)
    *	Arguments:	Pointer to an OEMINFO structure.
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *****************************/
    extern int far DAPI RF_GetLinkStatus(OEMINFO far * OemInfo);
    
    /****************************
    *	int far RF_GetRadioConfig(CONFIGINFO far * ConfigParameters)
    *   Purpose: This routine is used to retrieve the Proxim radio config info (dhc)
    *	Arguments: Pointer to a CONFIGINFO structure
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *****************************/
    extern int far DAPI RF_GetRadioConfig(CONFIGINFO far * ConfigParameters);
    
    /****************************
    *	int far RF_SetSecurityID(char far *Buff)
    *   Purpose: This routine is used to set the security ID in the Proxim radio (dhc)
    *	Arguments:	Pointer to a 20 byte NULL terminated string containing the new ID
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *			-2 = Invalid string
    *****************************/
    extern int far DAPI RF_SetSecurityID(char far *Buff);
    
    /****************************
    *	int far RF_SetDefaultSecurityID(void)
    *   Purpose: This routine is used to reset the Proxim radio security ID to the factory default (dhc)
    *	Arguments:	None
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *****************************/
    extern int far DAPI RF_SetDefaultSecurityID(void);
    
    /****************************
    *   int far RF_GetAironetCap(CAP_RID_INFO far * CapValues)
    *   Purpose: This routine is used to retrieve the Aironet radio Capabilites RID info (dhc)
    *   Arguments: Pointer to a CAP_RID_INFO structure
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *****************************/
    extern int far DAPI RF_GetAironetCap(CAP_RID_INFO far * CapValues);
    
    /****************************
    *   int far RF_GetAironetStatus(STATUS_RID_INFO far * StatusValues)
    *   Purpose: This routine is used to retrieve the Aironet radio Status RID info (dhc)
    *   Arguments: Pointer to a STATUS_RID_INFO structure
    *	Returns: 1 = Sucess,
    *			 0 = failure
    *			-1 = OEMTSR NOT LOADED
    *****************************/
    extern int far DAPI RF_GetAironetStatus(STATUS_RID_INFO far * StatusValues);
    
    /****************************
    *   int far RF_CardPower(int OnOff)
    *   Purpose: This routine is used to turn power on or off to the radio card.
    *   Arguments: 0 = Power off, 1 = Power on
    *   Returns: 1 = ok
    *            0 = invalid parameter value
    *****************************/
    extern int far DAPI RF_CardPower(int OnOff);
    
    /****************************
    *	void far RF_Sleep(U8 RadioOn)
    *	Purpose: This routine is used to put the Dolphin to sleep. It is similar to
    *			 the batch sleep. If RadioOn is true, the radio is left energized
    *			 and IRQ3 will wake the unit up. (as well as ACIN or IRQ1)
    *	Arguments: 0 = Turn Radio OFF in suspend mode
    *			   1 = Leave Radion ON in suspend mode
    *	Returns: -1 = Radio not loaded
    *			  1 = OK
    *****************************/
    extern void far DAPI RF_Sleep(int Timeout);
    extern int far DAPI RF_IsUnitRF(void);
    
    /****************************
    *   int far rf_card(unsigned int OnOff)
    *   Purpose: To give user the ability to turn the power on/off to the expansion bus connector
    *   Arguments: OnOff: 0 == Off , 1 == On
    *   Returns: 1 = Success, 0 = Error
    *   Note: Power will also be removed from the laser engine.
    *****************************/
    extern int far DAPI rf_card(unsigned int OnOff);
    
    /****************************
    *   int far rf_card_enable(unsigned int OnOff)
    *   Purpose: To give user the ability to turn the power on/off to the expansion bus connector (requires Common board
    *            P7200001-02 and up).
    *   Arguments: OnOff: 0 == Off , 1 == On
    *   Returns: 1 = Success, 0 = Error
    *   Note: This function uses a different pin on the micro to remove power. As a result, power to the laser engine is NOT affected.
    *****************************/
    extern int far DAPI rf_card_enable(unsigned int OnOff);
    
    /****
    *	End RF Dolphin Specific
    ****/
    
    #endif /* #ifndef H2ASH */
    
    struct bios_version
    {
    	unsigned char bios_major;
    	unsigned char bios_minor;
    	unsigned char bios_beta;
    	unsigned char xilinx_major;
    	unsigned char xilinx_minor;
    	unsigned char flags;
    	unsigned char reserved[10];
    };
    
    /* Bit field definitions for bios_version.flag. */
    enum
    {
    	BV_NUMERIC = 1,
    	BV_BLIND   = 2,
    };
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif
    


  • wie schon gesagt: du musst die library dazulinken.

    je nach compiler mit einbinden (schau in deinem compilerfaq, wie du es tun musst, sprich: wahrscheinlich fährst du den watcom)

    oder versuchs mit dem pragma, manche compiler machen das. leg die library mit in den ordner.
    so long



  • hier ab seite 69 steht es für einige compiler beschrieben
    http://www.gomaro.ch/ftproot/medlph11e.pdf



  • Irgendwie bin ich da zu blöde zu...
    Ich schaffe es nicht die Library zu meinem Projekt hinzuzufügen.
    Verstehe ich das richtig:
    -mein Programm benutzt eine Include-Datei
    -die Include Datei greift auf die Biliothek xxx.lib zu

    Wie mache ich das genau?? In der Anleitung steht irgendwas von wegen "auf die EXE klicken, dann add...", aber bei mir gibts nirgendwo eine EXE, auf die ich klicken könnte... HELP!

    Chris



  • schau doch mal bei borland obs da noch ne beschreibung zu deinem compiler gibt, oder google einfach mal, dass lässt sich sicher irgendwo finden! 👍



  • NEIN

    für dos bleib mal bei dem turbo.

    warum linkst du nicht mit pragma? oder liest einfach mal das compilerfaq?
    denke, du musst über options dazulinken.
    http://www.horstmann.com/ccc/help/tc30dos.html

    so long



  • Du bist der Größte!! DANKE!
    Dieses Mini-Tutorial hat's gebracht!

    Chris



  • Doom5000 schrieb:

    Du bist der Größte!! DANKE!

    wieso der

    *frustriert sei*



  • Ich hab jetzt doch einen neuen Thread aufgemacht, weil es ein ganz anderes Thema ist....


Anmelden zum Antworten