VR-Forces 4.10 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) 2019 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
18 // Must match the following enumerations:
19 // - VR-Link: include/vl/diguyCustomPdu.h (DtDIGuyCustomPduMsgId)
20 // - DI-Guy: src/libs/libpeopleshop/src/diguy_dis_constants.h (diguyCustomPDUType)
22 {
35 };
36 
37 // ======================================================================================
38 // Note: the PDU-decoding code that exists here should be kept in sync with the PDU code
39 // that lives in bdiDisInterface and bdiExerciseInterfaceDis in DI-Guy.
40 // ======================================================================================
41 
42 /*
43  This class extends the decoder in VR-Link. It exists only as a home for several
44  static encoder functions, which will replace the original ones in the parent class.
45 
46  Instructions for developers who come here in the future:
47 
48  Go to c:\mak-dev\vrvantage-for-forces\include\vrvVrl\DtEntityExistenceListener.inl
49  The code in processDiGuyPdu() must be moved here. Unfortunately, the stuff with
50  the listener doesn't translate well -- we'll need to update the DI-Guy ESR to support
51  appearance effects, gestures, variations, and so forth.
52 */
54 {
55 public:
56 
58  virtual ~DtExtDIGuyCustomPduDecoder();
59 
63  virtual void decode( DtPdu* pdu, DtEntityStateRepository* stateRep );
64  virtual DtPduDecoder* clone() const;
65  virtual void clearCallbacks();
66 
69  virtual void addDiGuyPduCallback( DtExtDIGuyCustomPduMsgId k, DtDIGuyPduCallbackFcn info );
70  virtual void removeDiGuyPduCallback( DtExtDIGuyCustomPduMsgId k, const DtDIGuyPduCallbackFcn& info );
71 
72 public:
73 
74  static void processDiGuyAppearance( DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr );
75  static void processDiGuyType( DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr );
76  static void processDiGuyAction( DtDIGuyCustomPdu* pdu, DtEntityStateRepository* pEsr );
77 
78 protected:
79 
80  // We're replacing the array in the parent class because it wasn't big enough.
81  // (std::set isn't expandable)
82 #define DtEXTMAX_DIGUYMSG_KINDS 50
83  std::set<DtDIGuyPduCallbackFcn> myExtDiGuyCbList[DtEXTMAX_DIGUYMSG_KINDS];
84 
85 };
86 
87 #endif // DtDIS
Definition: extDiGuyCustomPduDecoder.h:30
Definition: extDiGuyCustomPduDecoder.h:32
Definition: extDiGuyCustomPduDecoder.h:31
Definition: extDiGuyCustomPduDecoder.h:33
Definition: extDiGuyCustomPduDecoder.h:27
#define DtEXTMAX_DIGUYMSG_KINDS
Definition: extDiGuyCustomPduDecoder.h:82
Definition: extDiGuyCustomPduDecoder.h:29
Definition: extDiGuyCustomPduDecoder.h:23
DtExtDIGuyCustomPduMsgId
Definition: extDiGuyCustomPduDecoder.h:21
Definition: extDiGuyCustomPduDecoder.h:34
Definition: extDiGuyCustomPduDecoder.h:28
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
Definition: extDiGuyCustomPduDecoder.h:53
Definition: extDiGuyCustomPduDecoder.h:25
Definition: extDiGuyCustomPduDecoder.h:24
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23
Definition: extDiGuyCustomPduDecoder.h:26

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)