VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extDiGuyCustomPduDecoder.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
15 #include <vl/diGuyCustomPduDecoder.h>
16 
17 // Because there's a limit to the range of values defined inside VR-Link and we need more
19 {
32 };
33 
34 // ======================================================================================
35 // Note: the PDU-decoding code that exists here should be kept in sync with the PDU code
36 // that lives in bdiDisInterface and bdiExerciseInterfaceDis in DI-Guy.
37 // ======================================================================================
38 
39 /*
40  This class extends the decoder in VR-Link. It exists only as a home for several
41  static encoder functions, which will replace the original ones in the parent class.
42 
43  Instructions for developers who come here in the future:
44 
45  Go to c:\mak-dev\vrvantage-for-forces\include\vrvVrl\DtEntityExistenceListener.inl
46  The code in processDiGuyPdu() must be moved here. Unfortunately, the stuff with
47  the listener doesn't translate well -- we'll need to update the DI-Guy ESR to support
48  appearance effects, gestures, variations, and so forth.
49 */
51 {
52 public:
54  virtual ~DtExtDIGuyCustomPduDecoder();
55 
59  virtual void decode(DtPdu * pdu, DtEntityStateRepository* stateRep);
60  virtual DtPduDecoder* clone() const;
61  virtual void clearCallbacks();
62 
65  virtual void addDiGuyPduCallback(DtExtDIGuyCustomPduMsgId k, DtDIGuyPduCallbackFcn info);
66  virtual void removeDiGuyPduCallback(DtExtDIGuyCustomPduMsgId k, const DtDIGuyPduCallbackFcn& info);
67 
68 public:
69  static void processDiGuyAppearance(DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr);
70  static void processDiGuyType(DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr);
71  static void processDiGuyAction(DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr);
72 
73 protected:
74 
75  // We're replacing the array in the parent class because it wasn't big enough.
76  // (std::set isn't expandable)
77 #define DtEXTMAX_DIGUYMSG_KINDS 50
78  std::set<DtDIGuyPduCallbackFcn> myExtDiGuyCbList[DtEXTMAX_DIGUYMSG_KINDS];
79 
80 };
81 
82 #endif // DtDIS

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)