Changeset 233 in tmcsimulator for branches/FEPSimulator/DataPacker.h


Ignore:
Timestamp:
11/13/2017 06:07:07 PM (8 years ago)
Author:
jtorres
Message:

FEPSim: finalized comments, added to both header and source files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FEPSimulator/DataPacker.h

    r159 r233  
    3131 
    3232private: 
     33    // static message var 
    3334    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     */ 
    3541    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     */ 
    3750    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     */ 
    3958    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     */ 
    4165    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     */ 
    4372    VOLOCC packVOLOCC(int vol, int occ); 
    4473 
Note: See TracChangeset for help on using the changeset viewer.