Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
.gif)
10/16/2008
This class represents an error message. This can be either an error message that is received from the MSN Direct receiver, or an error message that will be sent by the host device.
Syntax
class ErrorMsg : public Msg
Methods
| Method | Description |
|---|---|
Initializes the fields of this class by calling the Init method. |
|
Converts the current error code to a human-readable string, assuming that the error code is referring to an application-level error. |
|
Returns the MSN Direct service type. |
|
Returns a pointer to the first byte of this message after the beginning-of-frame. |
|
Returns a pointer to the first byte of the message, which includes framing. |
|
Returns the error code of this message. |
|
Converts the current error code to a human-readable string, assuming that the error code refers to a protocol-level error. |
|
Returns the size of the message, subtracting framing. |
|
Determines the size of this type of message by calling RawMessageSize, and then returns the size. |
|
Returns the transaction ID of this message. |
|
Initializes the fields of this class. |
|
Returns true if this message is a response message. |
|
Returns the total size of this message type. |
|
Computes the Cyclic Redundancy Check (CRC) value. |
|
Sets the error code for this message. |
|
Sets the last bit of the transaction ID if the IsResponse input parameter is true. This bit denotes that the current message is a response message. |
|
Sets the transaction ID of this message. |
Remarks
This class inherits from the Msg Class.
You must create a subclass of the DBR701 class and override all handlers that handle messages that the application is listening for. The return value of a message is considered an error code, which is also returned to the MSN Direct receiver. Therefore, to inform the receiver that a specific message has an error, you must create an instance of the ErrorMsg class and send it to the receiver.
In the current implementation of the DBR701 class, this class is created by the DBR701 class when an error message is sent from the MSN Direct receiver to the host device. If the incoming message from the receiver is an error, the IsResponse method of the message object will return true, and the MSN Direct service type will be PROTOCOL_ERROR. The DBR701 class typecasts the incoming message object to an ErrorMsg object, determines the type of error it is by calling ErrorMsg::GetErrorCode, and then logs the error if error logging is enabled.
In MSN Direct services for Windows Embedded CE, the host device is the Windows Embedded CE powered device.
Requirements
| Header | DBRLib.h |
| Library | DBRLib.lib |
| Windows Embedded CE | Windows CE 5.0, Windows Embedded NavReady 2009 |