File: XCompCtrlV2.cpp

package info (click to toggle)
cigi-ccl 3.3.3a%2Bsvn818-7
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,332 kB
  • ctags: 7,175
  • sloc: cpp: 62,566; makefile: 541; ruby: 400; ansic: 313; sh: 68
file content (67 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download | duplicates (2)
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));

}