Changeset 233 in tmcsimulator for branches/FEPSimulator/DataPacker.h
- Timestamp:
- 11/13/2017 06:07:07 PM (8 years ago)
- File:
-
- 1 edited
-
branches/FEPSimulator/DataPacker.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/DataPacker.h
r159 r233 31 31 32 32 private: 33 // static message var 33 34 static unsigned char *msg; 34 // Packs the static data in message sent to ATMS 35 /** 36 * Packs the static meta data into the msg 37 * 38 * @param station station being packed 39 * @return the msg 40 */ 35 41 unsigned char * staticDataPack(STATION *station); 36 // Packs dynamic data in message sent to ATMS 42 /** 43 * Packs the dynamic (occ/vol) data into the message 44 * 45 * @param station the station being packed 46 * @param packNo number that specifies which lane types to compare 47 * @param pos position in the message (byte number) 48 * @return position (int) 49 */ 37 50 int dynamicDataPack(STATION *station, int packNo, int pos); 38 // Sets last byte of message 51 /** 52 * Returns the sum of values from byte 1 (after 0x0D0A) to the second to last byte 53 * 54 * @param dataptr msg data pointer 55 * @param len length of message 56 * @return checksum value 57 */ 39 58 char chksum(unsigned char *dataptr, int len); 40 // Tells whether or not data is available for specified lane 59 /** 60 * Checks if there is data available at the specified lane 61 * @param flag 62 * @param num 63 * @return bool (is data available) 64 */ 41 65 bool DataAvail(char flag, int num); 42 // Helper function: packs vol and occ into two byte data packet 66 /** 67 * Convert volume and occupancy data to a two-byte data packet 68 * @param vol 69 * @param occ 70 * @return the volume occupancy two byte data packet struct 71 */ 43 72 VOLOCC packVOLOCC(int vol, int occ); 44 73
Note: See TracChangeset
for help on using the changeset viewer.
