Garmin Fleet Management Controller  2.19.0
MessageId.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * MessageId.h
5 *
6 * Copyright 2009 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 
11 #ifndef MESSAGEID_H
12 #define MESSAGEID_H
13 
14 #include "stdafx.h"
15 #include <fstream>
16 
17 #include "fmi.h"
18 
19 //----------------------------------------------------------------------
25 //----------------------------------------------------------------------
26 class MessageId
27 {
28 public:
29  MessageId();
30  MessageId
31  (
32  const MessageId & aRightSide
33  );
34  MessageId
35  (
36  const uint8 aIdSize,
37  const uint8 * aId
38  );
39  MessageId
40  (
41  const CString & aCString,
42  codepage_type aCodePage
43  );
44 
45  bool operator<
46  (
47  const MessageId & aRightSide
48  ) const;
49 
50  const MessageId& operator=
51  (
52  const MessageId & aRightSide
53  );
54 
55  bool operator==
56  (
57  const MessageId & aRightSide
58  ) const;
59 
60  const uint8 * getId() const;
61 
62  uint8 getIdSize() const;
63 
64  CString toCString
65  (
66  codepage_type aCodePage
67  ) const;
68 
69 private:
70  uint8 mId[16];
72 };
73 
74 #endif
MessageId()
Default constructor.
Definition: MessageId.cpp:18
codepage_type
The code page used for encoding of text fields sent to or received from the client.
Definition: fmi.h:189
CString toCString(codepage_type aCodePage) const
CString representation of the message ID.
Definition: MessageId.cpp:167
uint8 mId[16]
The message ID.
Definition: MessageId.h:70
uint8 mIdSize
Number of significant bytes of mId.
Definition: MessageId.h:71
const uint8 * getId() const
Return a reference to the bytes of the message ID.
Definition: MessageId.cpp:144
unsigned char uint8
8-bit unsigned integer
Definition: garmin_types.h:62
uint8 getIdSize() const
Return the size of the message ID.
Definition: MessageId.cpp:152
Encapsulation of a message ID.
Definition: MessageId.h:26