Home
DEVG - Senior Design
Contents
1. are used UINT32 A little endian 32 bit unsigned integer DOUBLE A 64 bit double precision floating point number Little endian STRING A null terminated ASCII character string File Description The first four bytes in the file contain the number of records in the database stored as a UINT32 Next follows a record descriptor for each record in the database lt UINT32 gt Number of Records RECORD RECORD Record Descriptor The first four bytes of the record descriptor contain the size of the record stored as a UINT32 The record size includes the four bytes that store the size Next comes the barcode data associated with the record stored as a STRING If no barcode is associated with the record the string consists of a single null character Next comes the number of buffers in the record stored as a UINT32 Next comes a buffer descriptor for each buffer in the record lt UINT32 gt record size lt STRING gt barcodeData lt UINT32 gt numberOfBuffers BUFFER BUFFER Buffer Descriptor The first four bytes of the buffer descriptor contain the start address for the buffer stored as a UINT32 Next comes the size of the buffer in bytes stored as a UINT32 Note this is the size of the buffer not the size of the buffer descriptor Last comes the actual buffer data lt UINT32 gt start address lt UINT32 gt bufferSize bufferdata Confidential Metalcraft Inc 2002 Page 14 of 14 RFID Label Read Write System De
2. editor RFID device settings Lastly the settings for the RFID device are saved They are different for each RFID device but usually consist of at least a port number Confidential Metalcraft Inc 2002 Page 15 of 15
3. Metalcraft Inc RFID Label Read Write System Developer s Guide Version 1 0 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG Revision History Confidential Metalcraft Inc 2002 Page 2 of 2 RFID Label Read Write System Developer s Guide Document ID DEVG Date April 25 2002 Table of Contents Preface 1 A Short History 2 Documentation Resources 3 Terminology and Notation Add Support for a New RFID Device 1 1 CRFIDDevice 1 2 Overriding functions 1 3 The Constructor 1 4 User Interface 2 Add Support for a New Barcode Device 2 1 CBarcodeDevice 2 2 Overriding functions 2 3 The Constructor 2 4 User Interface 3 User Interface and Processing Thread Synchronization 3 1 Start and Stop 3 2 _ Exiting the Application 3 3 Thread Died 4 Processing Thread and Web Handler Synchronization 5 Port Wiring 6 File Formats 6 1 RFID Image Database 6 2 Save Settings Confidential Metalcraft Inc 2002 NSIANDA DD Anan U WO o0 o0 OC 10 11 11 12 13 14 14 15 Page 3 of 3 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG Table of Figures Figure 3 1 Start anid Stops se sci iase sateen hes dante au ata danteve cds E deatere aan seoR vest asc E seh seth g 10 Figure 3 2 Exiting the Application i tcc c ce scoccceiles Sebecesce ssh oa cect acech ss bapedictecscavehctsshetacesckeubssbiadhecs
4. ce GetDeviceName void CSPCSDlg OnSelchangeBarcodeCombo This function is called when a user selects a new barcode device from the Barcode device selection list Let s assume your derived class is called CMyBarcodeDevice Simply add the following code to the function CMyBarcodeDevice mbd new CMyBarcodeDevice create an instance if str mbd gt GetDeviceName did the user select this device APP gt barcodeDevice mrd if yes assign it to the global variable else delete mrd else delete the instance devices h There is still one last thing to do to add support for a new barcode device Open devices h and include the h file for your derived class Confidential Metalcraft Inc 2002 Page 9 of 9 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 3 User Interface and Processing Thread Synchronization There are two threads running as part of the SPCS program These threads are the User Interface thread and the Processing Thread The following sections describe how the threads synchronize 3 1 Start and Stop Figure 3 1 shows how events are used to synchronize starting and stopping When the user clicks the start button the user interface signals startEvent This tells the processing thread to begin the label writing process When the user clicks stop the user interface signals stopEvent then waits for the processing thread to signal either finish
5. cvevlsdicnslases cbevbesacbuety 11 Pipure 3 3 Thread Died 2 55525 2ehes foe ised chess E E EE E tides T EA 11 Figure 4 1 Processing Thread and Web Handler Signals 0 cceeecssseccsceseeseceeesecseeeceaecaeesecaeeeecnaeeeceaeeeesaecaeeaeeneeered 12 Figure 5 1 Port Wiring Diagram ccesceccsssecsseescesseeseceseenseeeseceaeceaecseecaeecaeeeaecseesseeeseenseeaecsaecsecesecaeecseeeseseaeenseeateeas 13 Confidential Metalcraft Inc 2002 Page 4 of 4 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG Preface 1 A Short History The Software Processing and Control Subsystem SPCS and the RFID Image Database Tool were originally developed by Iowa State s May02 01 senior design team These combined with Metalcraft s transport subsystem form Metalcraft s RFID Label Read Write and Transport System Documentation Resources 1 RFID Label Read Write System Developer s Guide DEVG V1 0 2002 2 Software Processing and Control Subsystem User s Manual SPCSUM V1 0 2002 3 RFID Image Database Tool User s Guide DTUG V4 0 2002 Terminology and Notation RFID Image A record containing the binary data to be programmed into RFID tags a description of where in the tag to put it and the associated barcode if one exists RFID Image Database A collection of RFID Images Schema Description of RFID Image structure Software Processing and Control System SPCS The software
6. d the following code to the function CMyRFIDDevice rfidDevice pCombo gt AddString rfidDevice GetDeviceName void CSPCSDlg OnSelchangeRfidCombo This function is called when a user selects a new RFID device from the RFID device selection list Let s assume your derived class is called CMyRFIDDevice Simply add the following code to the function CMyRFIDDevice mrd new CMyRFIDDevice create an instance if str mrd gt GetDeviceName did the user select this device APP gt rfidDevice mrd if yes assign it to the global variable else delete mrd else delete the instance devices h There is still one last thing to do to add support for a new RFID device Open devices h and include the h file for your derived class Confidential Metalcraft Inc 2002 Page 7 of 7 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 2 2 1 2 2 2 2 1 2 2 2 2 2 3 2 2 4 2 2 5 2 2 6 2 2 7 2 3 Add Support for a New Barcode Device CBarcodeDevice The abstract class CBarcodeDevice defines the interface used to control a barcode device When adding support for a new barcode device you must derive your class from CBarcodeDevice Overriding functions The following functions must be overridden in your derived class void DisplayPropWnd When this function is called a window should display which prompts the user to select settings Most barc
7. edEvent or threadKilled z Start l i startEvent stopEvent finishedEvent or threadKilled Figure 3 1 Start and Stop Confidential Metalcraft Inc 2002 Page 10 of 10 RFID Label Read Write Sytem Developer s Guide Date April 25 2002 Document ID DEVG 3 2 Exiting the Application Figure 3 2 shows the events for exiting the application When the user chooses to exit the application the user interface firsts checks if the processing thread is running If the processing thread is running the user interface stops it by signaling stopEvent The user interface signals killEvent which notifies the processing thread to exit then restarts the processing thread by signaling startEvent Just before the processing thread exits it signals threadKilled which tells the user interface it can now exit l processing true stopEvent killEvent AppExit threadKilled Figure 3 2 Exiting the Application 3 3 Thread Died When the processing thread incurs a fatal error and must exit it sends a WM_THREAD DIED message to the user interface thread The user interface displays the error then exits See Figure 3 3 iPr ing Thr User Interface WM_THREAD_DIED Figure 3 3 Thread Died Confidential Metalcraft Inc 2002 Page 11 of 11 RFID Label Read Write Sytem Developer s Guide Date April 25 2002 Document ID DEVG 4 Processing Thread and Web Handler Synchronization Figure 4 1 s
8. hows the signal handshaking that occurs between the processing thread of the SPCS and the web handler unit startEvent AdvanceLabel HIGH Advance the Web LabellnPlace HIGH N Process Label error occurred MarkLabel HIGH A Mark label bad MarkLabelAck HIGH MarkLabel LOW MarkLabelAck LOW AdvanceLabel LOW LabellnPlace LOW Figure 4 1 Processing Thread and Web Handler Signals Confidential Metalcraft Inc 2002 Page 12 of 12 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 5 Port Wiring Figure 5 1 shows the how the cable between the PC and the web handler is wired The parallel port on the PC did not have enough power for the application so an external power source and pull up resistors were added to boost the signal Parallel Connector DB25 _ Web Contrl _ Signal Pin OPTO 88 I O LabelinPlace 12 06 19 O6 WebInMotion 10 07 20 07 MarkLabelAck 11 08 24 O8 AdvanceLabel 2 18 21 18 MarkLabel 2 17 22 I7 Encoder 5 VDC GND Figure 5 1 Port Wiring Diagram Confidential Metalcraft Inc 2002 Page 13 of 13 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 6 6 1 6 1 1 File Formats RFID Image Database Types Items are stored in the RFID Image Database based on the standard types in the A32 Specifically the following types
9. ns a description of the last reported error Confidential Metalcraft Inc 2002 Page 6 of 6 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 1 2 9 1 2 10 1 3 1 4 1 4 1 1 4 2 1 4 3 CString GetDeviceName Returns a short description of the device This description is used in the RFID Device selection list as well as in the saved settings file As a result make it descriptive but don t make it excessively long bool Initialize This function must open a communications port to the device and properly configure the device If the initialization is successful the member variable named Active should be set to true otherwise it should be set to false This function returns the value of the member variable named Active The Constructor The constructor should set the protected member variable named Active to false User Interface In addition to creating a class to control your new device you must also update certain user interface functions These functions are located in DeviceFncs cpp void CSPCSDIg LoadRFIDComboBox CComboBox pCombo This function adds a description to the RFID Device selection list for each supported device Simply create an instance of your derived class and call the AddString function of the CComboBox object passing it a description of your device For example let s assume your derived class is called CMyRFIDDevice Simply ad
10. ode devices will at least allow the user to select which port the device is on You will need to create the window resources and any associated classes for this window If your device has no user selectable settings you should display a message box stating that it doesn t void SaveSettings CFile saveFile SPCS barcode device and RFID device settings are all save into a single file This function is called as part of the SPCS save settings operation The file object will already be opened Simply write your settings to the file You must not explicitly move the file pointer and you must not close the file These two operations can corrupt the entire saved settings file See section 5 2 Save SettingsSave Settings void LoadSettings CFile loadFile This function loads settings from the saved settings file You must read back the data exactly like you stored it in the SaveSettings function no more no less The calling procedure assumes that the file pointer is positioned immediately after your portion of the file when this function returns See section 5 2 Save Settings bool ReadBarcode CString amp data This function should read data from the barcode reader The data is stored as a string into data Upon completion the function should return true if the barcode was read and false if the barcode wasn t read CString GetErrorString Returns a description of the last reported error CString GetDeviceName Returns a short desc
11. ription of the device This description is used in the Barcode Device selection list as well as in the saved settings file As a result make it descriptive but don t make it excessively long bool Initialize This function must open a communications port to the device and properly configure the device If the initialization is successful the member variable named Active should be set to true otherwise it should be set to false This function returns the value of the member variable named Active The Constructor The constructor should set the protected member variable named Active to false Confidential Metalcraft Inc 2002 Page 8 of 8 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG 2 4 2 4 1 2 4 2 2 4 3 User Interface In addition to creating a class to control your new device you must also update certain user interface functions These functions are located in DeviceFncs cpp void CSPCSDlg LoadBarcodeComboBox CComboBox pCombo This function adds a description to the Barcode Device selection list for each supported device Simply create an instance of your derived class and call the AddString function of the CComboBox object passing it a description of your device For example let s assume your derived class is called CMyBarcodeDevice Simply add the following code to the function CMyBarcodeDevice barcodeDevice pCombo gt AddString barcodeDevi
12. sSave Settings void LoadSettings CFile loadFile This function loads settings from the saved settings file You must read back the data exactly like you stored it in the SaveSettings function no more no less The calling procedure assumes that the file pointer is positioned immediately after your portion of the file when this function returns See section 5 2 Save Settings bool WriteAndVerifyBlock WORD block BYTE buffer WORD size This function should write a block of data to the current RFID tag Size indicates the size of the buffer and block indicates which block to write the data into This function must also verify the data was written correctly It should return true if function was successful otherwise it should return false The calling procedure will handle the allocation and deallocation of buffer so do not free this memory space WORD ReadBlock WORD block BYTE buffer WORD buffer_size This function should read a block of data from the current RFID tag Size indicates the size of the buffer and block indicates which block to read the data from Upon completion the function should return the actual number of bytes read The calling procedure will handle the allocation and deallocation of buffer so do not free this memory space and do not allocate space to buffer WORD GetBlockSize Returns the block size of the tag in bytes WORD GetBlockCount Returns the number of blocks on the tag CString GetErrorString Retur
13. system that controls the devices and web handler that actually writes the RFID labels Confidential Metalcraft Inc 2002 Page 5 of 5 RFID Label Read Write System Developer s Guide Date April 25 2002 Document ID DEVG Add Support for a New RFID Device 1 1 1 2 1 2 1 1 2 2 1 2 3 1 2 4 1 2 5 1 2 6 1 2 7 1 2 8 CRFIDDevice The abstract class CRFIDDevice defines the interface used to control a RFID device When adding support for a new RFID device you must derive your class from CRFIDDevice Overriding functions The following functions must be overridden in your derived class void DisplayPropWnd When this function is called a window should display which prompts the user to select settings Most RFID devices will at least allow the user to select which port the device is on You will need to create the window resources and any associated classes for this window If your device has no user selectable settings you should display a message box stating that it doesn t void SaveSettings CFile saveFile SPCS barcode device and RFID device settings are all save into a single file This function is called as part of the SPCS save settings operation The file object will already be opened Simply write your settings to the file You must not explicitly move the file pointer and you must not close the file These two operations can corrupt the entire saved settings file See section 5 2 Save Setting
14. veloper s Guide Date April 25 2002 Document ID DEVG 6 2 6 2 1 6 2 2 6 2 3 6 2 4 6 2 5 6 2 6 6 2 7 6 2 8 Save Settings Global variables First the global variables are saved They are four bytes each and saved in the following order backToBackErrors runType totalErrors and totalLabelCount Image Database Path and Filename Next the image database path and filename are saved as a null terminated ASCII string For example C My Documents test rdb If no database was loaded only a null character is saved Barcode Device Identifier Next a description of the barcode device is saved This description must match the description returned by GetDeviceName exactly in order for the SPCS program to load the correct device RFID Device Identifier Next a description of the RFID device is saved This description must match the description returned by GetDeviceName exactly in order for the SPCS program to load the correct device Barcode Eye Catcher Next a barcode eye catcher is saved This eye catcher is the four ASCII characters BARD This is useful when viewing the file with a hex editor Barcode Settings Next the settings for the barcode device are saved They are different for each barcode device but usually consist of at least a port number RFID Eye Catcher Next a RFID eye catcher is saved This eye catcher is the four ASCII characters RFID This is useful when viewing the file with a hex
Download Pdf Manuals
Related Search
Related Contents
I MANUALE DI ISTRUZIONI PER APPARECCHIO DI Automotive Computer System Diagnostics eBook StarTech.com 1U 17" Rackmount LCD Console with 8 Port Multi-Platform KVM Philips myBathroom Ceiling light 32064/31/16 Altova DiffDog Benutzer MANUALE D`USO - Migros Preview Software Manual - BioQUEST Curriculum Consortium Peerless ACC319-AB mounting kit Copyright © All rights reserved.
Failed to retrieve file