1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
// XCompCtrlV2.cpp: Body of the XCompCtrlV2 class.
//
//////////////////////////////////////////////////////////////////////
#include "XCompCtrlV2.h"
#include "CigiExceptions.h"
#include <stdio.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
XCompCtrlV2::XCompCtrlV2()
{
}
XCompCtrlV2::~XCompCtrlV2()
{
}
void XCompCtrlV2::OnPacketReceived(CigiBasePacket *Packet)
{
CigiCompCtrlV2 *InPckt = (CigiCompCtrlV2 *)Packet;
bool ok = true;
printf("Component Control:\n");
printf("\tComp ID = %d\n",InPckt->GetCompID());
printf("\tInstance ID = %d\n",InPckt->GetInstanceID());
printf("\tComp Class = %d : ",InPckt->GetCompClassV2());
switch(InPckt->GetCompClassV2())
{
case 0:
printf("EntityV2\n");
break;
case 1:
printf("EnvironmentV2\n");
break;
case 2:
printf("ViewV2\n");
break;
case 3:
printf("ViewGrpV2\n");
break;
case 4:
printf("SensorV2\n");
break;
case 5:
printf("SystemV2\n");
break;
default:
printf("\n");
break;
}
printf("\tComponent State = %d\n",InPckt->GetCompState());
printf("\tComponent Data 0 = %d\n",InPckt->GetLongCompData(0));
printf("\tComponent Data 1 = %d\n",InPckt->GetLongCompData(1));
}
|