Changeset 233 in tmcsimulator for branches/FEPSimulator/DataPacker.cpp
- Timestamp:
- 11/13/2017 06:07:07 PM (8 years ago)
- File:
-
- 1 edited
-
branches/FEPSimulator/DataPacker.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/FEPSimulator/DataPacker.cpp
r202 r233 1 1 #include "DataPacker.h" 2 2 3 // declare static message var 3 4 unsigned char * DataPacker::msg; 4 5 6 /** 7 * Returns packed data message to be sent to ATMS Server in fep_reply via RPC 8 * 9 * @param station The station for which the message is to be made 10 * @return The packed data message 11 */ 5 12 unsigned char * DataPacker::packData(STATION *station) { 6 13 int pos = 26; … … 44 51 } 45 52 53 /** 54 * Packs the dynamic (occ/vol) data into the message 55 * 56 * @param station the station being packed 57 * @param packNo number that specifies which lane types to compare 58 * @param pos position in the message (byte number) 59 * @return position (int) 60 */ 46 61 int DataPacker::dynamicDataPack(STATION *station, int packNo, int pos) { 47 62 … … 97 112 return pos; 98 113 } 99 114 /** 115 * Packs the static meta data into the msg 116 * 117 * @param station station being packed 118 * @return the msg 119 */ 100 120 unsigned char * DataPacker::staticDataPack(STATION *station) { 101 121 int j; … … 208 228 } 209 229 230 /** 231 * Checks if there is data available at the specified lane 232 * @param flag 233 * @param num 234 * @return bool (is data available) 235 */ 210 236 bool DataPacker::DataAvail(char flag, int num) { 211 237 int mag, fel; … … 238 264 } 239 265 240 // checksum based on data from byte 1 (after 0DOA) to the second last byte (the 266 /** 267 * Returns the sum of values from byte 1 (after 0x0D0A) to the second to last byte 268 * 269 * @param dataptr msg data pointer 270 * @param len length of message 271 * @return checksum value 272 */ 241 273 char DataPacker::chksum(unsigned char *dataptr, int len) { 242 274 int i; … … 249 281 } 250 282 251 // convert vol and occ data to a two-byte data packet 283 /** 284 * Convert volume and occupancy data to a two-byte data packet 285 * @param vol 286 * @param occ 287 * @return the volume occupancy two byte data packet struct 288 */ 252 289 VOLOCC DataPacker::packVOLOCC(int vol, int occ) 253 290 {
Note: See TracChangeset
for help on using the changeset viewer.
