![]() | ![]() | ![]() | The Constructor: | ![]() |
The constructor code looks something like this:
static char* pPacketVersion="1.0"; // Version of the packet. /*! Constructor: Initialize the documented packet. \param tag (unsigned short [in]): The tag that will be assigned to the documented packet. */ MyEventSegment::MyEventSegment(unsigned short tag) : m_MyPacket(tag, string("MyPacket"), string("Sample documented packet"), string(pPacketVersion)) { }
The constructor constructs the documented packet. The constructor for a documented packet has the following parameters:
Parameter | Type | Description |
Tag | unsigned short | An id for the tag. Daniel Bazin assigns these |
Name | string | Short name for the tag e.g. "S-800" |
Description | string | Long description of packet |
Version | string | Version of the packet format. |
The Version parameter should be changed if the packet format changes.
For this example, we will hard code the locations of the Phillips digitizers. In order to allow your code to work in conjunction with other event segments, you should probably parameterize your constructor with the location of the hardware.
![]() | ![]() | ![]() | The Constructor: | ![]() |