[go: up one dir, main page]

Menu

[r720]: / trunk / VTS3 / VTSDoc.h  Maximize  Restore  History

Download this file

775 lines (562 with data), 20.6 kB

  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
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
// VTSDoc.h : interface of the VTSDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VTSDOC_H__BDE65088_B82F_11D3_BE52_00A0C95A9812__INCLUDED_)
#define AFX_VTSDOC_H__BDE65088_B82F_11D3_BE52_00A0C95A9812__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxmt.h>
#include <afxtempl.h>
#include "BACnet.hpp"
#include "BACnetRouter.hpp"
#include "BACnetBTR.hpp"
#include "BACnetBBMD.hpp"
#include "BACnetBIPSimple.hpp"
#include "BACnetBIPForeign.hpp"
#include "WinIP.hpp"
#include "WinWinPcap.hpp"
//MAD_DB #include "JConfig.hpp"
//MAD_DB #include "JDB.hpp"
#include "VTSPropValue.h"
#include "VTSPacketDB.h"
class VTSStatisticsCollector;
typedef VTSStatisticsCollector *VTSStatisticsCollectorPtr;
class VTSStatisticsDlg;
typedef VTSStatisticsDlg *VTSStatisticsDlgPtr;
// forward declarations
class VTSDoc;
typedef VTSDoc *VTSDocPtr;
class CFrameContext;
typedef CFrameContext *CFrameContextPtr;
class VTSPort;
typedef VTSPort *VTSPortPtr;
class VTSWinWinPcapPort;
typedef VTSWinWinPcapPort *VTSWinWinPcapPortPtr;
class VTSWinIPPort;
typedef VTSWinIPPort *VTSWinIPPortPtr;
class VTSPortDlg;
typedef VTSPortDlg *VTSPortDlgPtr;
class VTSClient;
typedef VTSClient *VTSClientPtr;
class VTSServer;
typedef VTSServer *VTSServerPtr;
class VTSDevice;
typedef VTSDevice *VTSDevicePtr;
class VTSDevicePort;
typedef VTSDevicePort *VTSDevicePortPtr;
class VTSDeviceDlg;
typedef VTSDeviceDlg *VTSDeviceDlgPtr;
/* MAD_DB
class VTSObjPropValueList;
typedef VTSObjPropValueList *VTSObjPropValueListPtr;
*/
struct CSendGroup;
typedef CSendGroup *CSendGroupPtr;
typedef CSendGroupPtr *CSendGroupList;
class ScriptNetFilter;
typedef ScriptNetFilter *ScriptNetFilterPtr;
//
// VTSPort
//
// The VTSPort object sits between the VTSDoc and a derived class of BACnetPort (one
// of the VTSxPort objects). The port that it connects to depends on the contents of
// the descriptor.
//
//MAD_DB class VTSPort {
enum VTSPortType
{ nullPort
, ipPort
, ethernetPort
, arcnetPort
, mstpPort
, ptpPort
};
class VTSPort : public CObject
{
private:
static const char *m_pszPortTypes[6];
bool m_fDirty; // set if modifications (or new) have been made
protected:
// void AddToMasterList( void );
// void RemoveFromMasterList( void );
public:
int portStatus; // non-zero iff error
char *portStatusDesc; // status description
//MAD_DB objId portDescID; // ID of descriptor
//MAD_DB VTSPortDesc portDesc; // port configuration info
VTSDocPtr portDoc; // doc for packets
CSendGroupList portSendGroup; // send group to form packets
BACnetPortPtr portEndpoint; // endpoint to get them
ScriptNetFilterPtr portFilter; // way to process them in scripts
BACnetBTRPtr portBTR; // BTR object in stream
BACnetBBMDPtr portBBMD; // BBMD obj
BACnetBIPSimplePtr portBIPSimple; // BIP Simple endpoint
BACnetBIPForeignPtr portBIPForeign; // BIP Foreign
BACnetNetServerPtr portBindPoint; // points to one of the above
VTSDevicePtr m_pdevice; // pointer to bound device
// Begin persistent data
CString m_strName;
VTSPortType m_nPortType; // port type
BOOL m_fEnabled; // true iff IO should be enabled
int m_nNet; // network associated with device
CString m_strDevice; // Name of bound device, fixed-up at load and save
CString m_strConfigParms; // configuration string
// End persistent data
//MAD_DB VTSPort( VTSDocPtr dp, objId id );
VTSPort( void );
~VTSPort( void );
// void ReadDesc( void ); // read descriptor from database
// void WriteDesc( void ); // save changes to descriptor
// Moved to dialog void Configure( CString *cp ); // request a configuration dialog
void Refresh( void ); // reconnect to port
void Deactivate( void );
void SendData( BACnetOctet *data, int len ); // pass data to endpoint
LPCSTR GetName(void) { return m_strName; }
LPCSTR GetTypeDesc(int n) { return m_pszPortTypes[n]; }
LPCSTR GetTypeDesc(void) { return GetTypeDesc(m_nPortType); }
LPCSTR GetDeviceName(void) { return m_strDevice; }
void SetName( LPCSTR lpszName );
void SetEnabled( BOOL fEnabled = true );
void SetConfig( LPCSTR lpszConfig );
void SetPortType( VTSPortType nType );
void SetNetwork( int nNetwork );
void SetDevice( VTSDevice * pdevice );
bool IsDirty() { return m_fDirty; }
bool IsEnabled() { return m_fEnabled == TRUE; }
void SetDirty( bool fDirty = true ) { m_fDirty = fDirty; }
void BindDevice(void);
void UnbindDevice(void);
const VTSPort& operator=(const VTSPort& rportSrc);
void Serialize( CArchive& archive );
DECLARE_SERIAL(VTSPort)
};
DECLARE_VTSPTRARRAY(VTSPorts, VTSPort)
typedef VTSPort *VTSPortPtr;
//
// VTSPortList
//
/* MAD_DB
class VTSPortList : public CList<VTSPortPtr,VTSPortPtr> {
friend class VTSPort;
protected:
VTSDocPtr m_pDoc;
public:
VTSPortList( void );
~VTSPortList( void );
void Load( VTSDocPtr docp ); // bind to database and load
void Unload( void ); // toss the ports away
void Add( void ); // add a new port
void Remove( int i ); // remove a port
VTSPortPtr FindPort( const char *name ); // find a port with a given name
VTSPortPtr FindPort( objId portID ); // find a port with a given port ID
int Length( void ); // number of defined ports
VTSPortPtr operator []( int i ); // index into port list
};
typedef VTSPortList *VTSPortListPtr;
extern VTSPortList gMasterPortList; // global list of all ports
*/
//
// VTSNameList
//
/* MAD_DB
class VTSNameList {
protected:
VTSDocPtr m_pDoc;
static VTSNameDesc searchName;
static int TDSearch( const VTSNameDescPtr, const VTSNameDescPtr );
public:
VTSNameList( void );
~VTSNameList( void );
void Load( VTSDocPtr docp ); // bind to database
void Add( void ); // add a new name
void Remove( int i ); // remove a name
int Length( void ); // number of defined names
const char* AddrToName( const BACnetAddress &addr, objId portID ); // translate to a name
void ReadName( int i, VTSNameDescPtr ndp );
void WriteName( int i, VTSNameDescPtr ndp );
void DefineTD( objId port, const BACnetOctet *addr, int len );
const BACnetAddress *FindTD( objId port ); // what is the TD address for a port
};
typedef VTSNameList *VTSNameListPtr;
*/
// Moved from VTSDB.h madanner 5/03
class VTSName : public CObject // serializable name element
{
private:
public:
// Begin persistent data
CString m_strName;
BACnetAddress m_bacnetaddr;
CString m_strPortNameTemp;
// End persistend data
VTSPort * m_pportLink;
public:
VTSName( void );
VTSName( LPCSTR pszname );
virtual ~VTSName( void );
const VTSName& operator=(const VTSName& rnameSrc);
void Serialize( CArchive& archive );
LPCSTR GetPortName(void) { return m_strPortNameTemp; }
LPCSTR GetName(void) { return m_strName; }
bool IsAddressMatch( const BACnetAddress &addr, VTSPort * pport );
DECLARE_SERIAL(VTSName)
};
class VTSNames : public CTypedPtrArray<CPtrArray, VTSName *>
{
DECLARE_VTSPTRARRAY_GUTS(VTSNames, VTSName)
public:
void Remove( int i ); // remove a name
int FindIndex( LPCSTR lpszName );
void InitializeTD( VTSPort * pport, const BACnetOctet *addr, int len );
LPCSTR AddrToName( const BACnetAddress &addr, VTSPort * pport );
};
class VTSFilter : public CObject // serializable filter element
{
private:
public:
// Begin persistent data
int m_type; // 1=accept, 0=reject
CString m_strPortNameTemp;
int m_addr; // none, source, destination, bidirectional
int m_addrType; // LS, LN, LB, RS, RN, RB, GB
BACnetAddress m_filteraddr; // address filter bits
int m_fnGroup; // function group
// End persistend data
VTSPort * m_pportLink;
public:
VTSFilter( void );
virtual ~VTSFilter( void );
const VTSFilter& operator=(const VTSFilter& rfilterSrc);
void Serialize( CArchive& archive );
LPCSTR GetPortName(void) { return m_strPortNameTemp; }
bool TestAddress( const BACnetAddress &addr );
DECLARE_SERIAL(VTSFilter)
};
class VTSFilters : public CTypedPtrArray<CPtrArray, VTSFilter *>
{
public:
VTSFilters();
virtual ~VTSFilters( void );
void DeepCopy( const VTSFilters * psrc );
void KillContents( void );
void Serialize( CArchive& archive );
void Remove( int i ); // remove a filter
bool TestPacket( const VTSPacket& packet );
int ConfirmedServiceFnGroup( int service );
int UnconfirmedServiceFnGroup( int service );
DECLARE_SERIAL(VTSFilters)
};
namespace NetworkSniffer {
//extern JDBListPtr gNameListSearchList;
//extern VTSNameDesc gNameListSearchName;
void SetLookupContext( const char * pszPortName );
const char* LookupName( int net, const BACnetOctet *addr, int len );
}
//
// VTSClient
//
class VTSClient : public BACnetClient {
public:
VTSDevicePtr clientDev;
VTSClient( VTSDevicePtr dp );
void Confirmation( const BACnetAPDU &apdu );
void IAm( void ); // initiate a global-broadcast I-Am
};
typedef VTSClient *VTSClientPtr;
//
// VTSServer
//
class VTSServer : public BACnetServer {
public:
VTSDevicePtr serverDev;
VTSServer( VTSDevicePtr dp );
void Indication( const BACnetAPDU &apdu );
void Response( const BACnetAPDU &pdu );
void WhoIs( const BACnetAPDU &apdu );
void IAm( const BACnetAPDU &apdu );
void ReadProperty( const BACnetAPDU &apdu );
void WriteProperty( const BACnetAPDU &apdu );
void CovNotification( const BACnetAPDU &apdu );
void GetAlarmSummary( const BACnetAPDU &apdu );
void GetEventInformation( const BACnetAPDU &apdu );
void DeviceCommunicationControl( const BACnetAPDU &apdu );
void AcknowledgeAlarm( const BACnetAPDU &apdu );
void EventNotification( const BACnetAPDU &apdu );
void ReinitializeDevice( const BACnetAPDU &apdu );
};
typedef VTSServer *VTSServerPtr;
//
// VTSDevice
//
// The VTSDevice object wraps around a BACnetDevice, BACnetRouter, VTSServer and
// VTSClient.
//
//MAD_DB
//class VTSObjPropertyValues;
class VTSDevice : public CObject
{
friend class VTSClient;
friend class VTSServer;
protected:
//MAD_DB
// void AddToMasterList( void );
// void RemoveFromMasterList( void );
BACnetDevice devDevice;
BACnetRouter devRouter;
VTSClient devClient;
VTSServer devServer;
VTSPortPtr devPort;
VTSDevicePortPtr devPortEndpoint;
public:
// objId devDescID; // ID of descriptor
// VTSDeviceDesc devDesc; // device configuration info
VTSDocPtr devDoc; // doc for packets
// VTSObjPropValueListPtr devObjPropValueList; // list of objects, properties and values
// Begin persistent data
CString m_strName; // name
int m_nInstance; // instance number
BOOL m_fRouter; // true iff device should act like a router
BACnetSegmentation m_segmentation; // supports segments requests
int m_nSegmentSize; // how to divide up chunks
int m_nWindowSize; // how many to send
int m_nMaxAPDUSize; // maximum APDU size
int m_nNextInvokeID; // next invoke ID for client
int m_nAPDUTimeout; // how long to wait for ack
int m_nAPDUSegmentTimeout; // how long to wait between segments
int m_nAPDURetries; // how many retries are acceptable
int m_nVendorID; // which vendor is this?
VTSDevObjects m_devobjects;
BACnetBitString m_services_supported;
int m_nEvents;
// End persistent data
BACnetBitString m_objects_supported;
// VTSDevice( VTSDocPtr dp, objId id );
VTSDevice( void );
~VTSDevice( void );
// void ReadDesc( void ); // read descriptor from database
// void WriteDesc( void ); // save changes to descriptor
void Bind( VTSPortPtr pp, int net ); // associate with a port and network
void Unbind( VTSPortPtr pp ); // disassociate
void SendAPDU( const BACnetAPDU &apdu ); // message from a script
void IAm( void ); // ask the client to send out an I-Am
void Activate( void );
void Deactivate( void );
LPCSTR GetName(void) { return m_strName; }
CString GetDescription(void);
VTSDevObjects * GetObjects(void) { return &m_devobjects; }
int ReadProperty( BACnetObjectIdentifier * pbacnetobjectid, BACnetEnumerated * pbacnetpropid, int nIndex, BACnetAPDUEncoder * pAPDUEncoder );
int InternalReadProperty( BACnetObjectIdentifier * pbacnetobjectid, BACnetEnumerated * pbacnetpropid, BACnetAPDUEncoder * pAPDUEncoder, int index );
int WriteProperty( BACnetObjectIdentifier * pbacnetobjectid, BACnetEnumerated * pbacnetpropid, int nIndex, BACnetAPDUDecoder * pdec );
int InternalWriteProperty( BACnetObjectIdentifier * pbacnetobjectid, BACnetEnumerated * pbacnetpropid, BACnetAPDUDecoder * pdec );
VTSDevObject * FindObject( unsigned int nObjID );
VTSDevProperty * FindProperty( VTSDevObject * pobject, int nPropID );
const VTSDevice& operator=(const VTSDevice& rdeviceSrc);
void Serialize( CArchive& archive );
// Needed if we change schema and want alarm support configuration to be persistent
// UINT SerializeSchema (CArchive &ar, CRuntimeClass *pClass);
DECLARE_SERIAL(VTSDevice)
};
typedef VTSDevice *VTSDevicePtr;
DECLARE_VTSPTRARRAY(VTSDevices, VTSDevice)
//
// VTSDeviceList
//
/* MAD_DB
class VTSDeviceList : public CList<VTSDevicePtr,VTSDevicePtr> {
protected:
VTSDocPtr m_pDoc;
static VTSDeviceDesc searchDevice;
static int TDSearch( const VTSDeviceDescPtr, const VTSDeviceDescPtr );
public:
VTSDeviceList( void );
~VTSDeviceList( void );
void Load( VTSDocPtr docp ); // bind to database
void Unload( void );
void Add( void ); // add a new name
void Remove( int i ); // remove a name
VTSDevicePtr FindDevice( const char *name ); // find a device with a given name
VTSDevicePtr FindDevice( objId id ); // find a device with a given objId
int Length( void ); // number of defined ports
VTSDevicePtr operator []( int i ); // index into device list
};
typedef VTSDeviceList *VTSDeviceListPtr;
extern VTSDeviceList gMasterDeviceList; // global list of all devices
*/
//
// VTSDoc
//
class CSend;
class VTSDoc : public CDocument
{
private:
int m_n1stPktFilePos; // holds file position of first packet in list
// useful for backward scrolling virtual window
int m_nPacketCount; // Current packets in document... may be different from
// size of packet array
int m_fLoadPackets; // false if max packet load has been reached
// ======== Persistent data start
CString m_strLogFilename;
VTSNames m_names;
VTSDevices m_devices; // list of persistent devices defined for this doc
VTSPorts m_ports; // list of persistent ports
VTSFilters m_captureFilters; // list of capture filters
VTSFilters m_displayFilters; // list of display filters
// ======== Persistent data end (preserve order)
CTypedPtrArray <CPtrArray, VTSPacketPtr> m_apPackets; // array of ptrs to packets
void DestroyPacketArray(void);
BOOL DeletePacket(int id); //added: 2004/12/02 author:Xiao Shiyuan purpose: delete selected packet
int LoadPacketArray( void );
void ScheduleForProcessing(void);
LPCSTR StripToPath( CString * pstr );
public: // create from serialization only
VTSDoc();
virtual ~VTSDoc();
DECLARE_DYNCREATE(VTSDoc)
// Attributes
public:
enum Signal
{ eInitialUpdate = 0
, eNewFrameCount = 1
};
static LPCSTR m_pszDefaultFilename;
VTSPacketDB m_PacketDB;
//MAD_DB int m_PacketCount; // packets in document
//MAD_DB VTSPortList m_Ports;
//MAD_DB VTSNameList m_Names;
//MAD_DB VTSDeviceList m_Devices;
bool m_postMessages; // OK to post messages about new packets
VTSPortDlgPtr m_pPortDlg;
VTSStatisticsDlgPtr m_pStatitiscsDlg;// a pointer to the statistics dialog
bool m_bStatisticsDlgInUse;// indicates whether the statistics dialog is shown
VTSStatisticsCollectorPtr m_pStatisticsCollector;
// Operations
public:
void BindFrameContext( CFrameContext *pfc );
void UnbindFrameContext( CFrameContext *pfc );
void SetPacketCount( int count );
int WritePacket( VTSPacket & pkt ); // MAD_DB
int GetPacketCount();
VTSPacketPtr GetPacket( int nIndex );
void ProcessPacketStoreChange(void);
LPCSTR AddrToName( const BACnetAddress &addr, const char * pszPortName = NULL );
void DefineTD( VTSPort * pport, const BACnetOctet *addr, int len );
bool LoadNamedAddress( BACnetAddress * pbacnetaddr, LPCSTR lpszNameLookup );
void ReActivateAllPorts(void);
void FixupPortToDeviceLinks( bool fCheckForExistingLink = true );
void FixupNameToPortLinks( bool fCheckForExistingLink = true );
void FixupFiltersToPortLinks( bool fCheckForExistingLink = true );
void BindPortsToDevices(void);
void UnbindPortsToDevices(void);
void ChangeCWDToWorkspace( LPCSTR lpszWksFile = NULL );
void SetNewCacheSize(void);
void CacheHint(int nFrom, int nTo);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(VTSDoc)
public:
virtual void Serialize(CArchive& ar);
virtual BOOL OnNewDocument();
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
virtual void OnCloseDocument();
//}}AFX_VIRTUAL
// Implementation
public:
void DeleteSelPacket(int index); // 2/25/05 Shiyuan Xiao. Delete selected packet.
void DeletePackets( void );
void DoPortsDialog( void );
void PortStatusChange( void );
void DoNamesDialog( void );
void DoCaptureFiltersDialog( void );
void DoDisplayFiltersDialog( void );
void DoDevicesDialog( void );
bool DoPacketFileNameDialog( bool fReload = true );
void SaveConfiguration(void);
void ReloadPacketStore(void);
// madanner 9/04, changed to return type from void
CSend * DoSendWindow( int iGroup, int iItem );
VTSDevices * GetDevices( void ) { return &m_devices; }
VTSPorts * GetPorts( void ) { return &m_ports; }
VTSNames * GetNames(void) { return &m_names; }
VTSFilters * GetCaptureFilters(void) { return &m_captureFilters; }
VTSFilters * GetDisplayFilters(void) { return &m_displayFilters; }
//MAD_DB void NewPacketCount(void);
virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);
void ConvertPathToRelative( CString * pstr );
// Jingbo Gao, 2004-9-20, do backup and restore test
void DoBackupRestore(void);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
CCriticalSection m_FrameContextsCS;
CFrameContextPtr m_FrameContexts;
// Generated message map functions
protected:
//{{AFX_MSG(VTSDoc)
afx_msg void OnViewStatistics();
afx_msg void OnEditQuickSave();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
typedef VTSDoc *VTSDocPtr;
//
// VTSDocList
//
/* MAD_DB no longer needed, single config doc
class VTSDocList : public CList<VTSDocPtr,VTSDocPtr> {
public:
VTSDocList( void );
~VTSDocList( void );
// list operations
void Append( VTSDocPtr vdp ); // add a child at the end
void Remove( VTSDocPtr vdp ); // remove a child
int Length( void ); // number of children
VTSDocPtr Child( int indx ); // child by index
};
typedef VTSDocList *VTSDocListPtr;
const int kVTSDocListSize = sizeof( VTSDocList );
extern VTSDocList gDocList; // list of all documents
*/
//
// VTSWinWinPcapPort
//
class VTSWinWinPcapPort : public WinWinPcap {
protected:
VTSPortPtr m_pPort;
public:
VTSWinWinPcapPort( VTSPortPtr pp );
virtual ~VTSWinWinPcapPort( void );
void FilterData( BACnetOctet *, int len, BACnetPortDirection dir );
void PortStatusChange( void );
};
//
// VTSWinIPPort
//
class VTSWinIPPort : public WinIP {
protected:
VTSPortPtr m_pPort;
public:
VTSWinIPPort( VTSPortPtr pp );
virtual ~VTSWinIPPort( void );
void FilterData( BACnetOctet *, int len, BACnetPortDirection dir );
void PortStatusChange( void );
};
//
// VTSDevicePort
//
class VTSDevicePort : public BACnetPort {
protected:
VTSPortPtr m_pPort;
VTSDevicePtr m_pDevice;
public:
VTSDevicePort( VTSPortPtr pp, VTSDevicePtr dp );
virtual ~VTSDevicePort( void );
void Indication( const BACnetNPDU &pdu );
void SendData( BACnetOctet *data, int len ); // raw data request
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VTSDOC_H__BDE65088_B82F_11D3_BE52_00A0C95A9812__INCLUDED_)