SimpleHostMsg Class

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

This class represents a message with a one-byte payload, which is the error code. It is sent from the host device to the MSN Direct receiver.

Syntax

class SimpleHostMsg : public Msg

Methods

Method Description

SimpleHostMsg Constructor

Initializes the fields of this class by calling the Init method.

SimpleHostMsg::GetApplicationType

Returns the MSN Direct service type of this simple host message.

SimpleHostMsg::GetBuffer

Returns a pointer to the first byte of this simple host message after the beginning-of-frame.

SimpleHostMsg::GetBufferWithFrames

Returns a pointer to the first byte of this simple host message, including the bytes used for framing.

SimpleHostMsg::GetSize

Returns the size of this simple host message, subtracting the bytes used for framing.

SimpleHostMsg::GetSizeWithFrames

Returns the size of this simple host message by calling RawMessageSize.

SimpleHostMsg::GetTransactionId

Returns the transaction ID of this simple host message.

SimpleHostMsg::Init

Initializes the fields of this class.

SimpleHostMsg::IsResponse

Returns true if this simple host message is a response message.

SimpleHostMsg::RawMessageSize

Returns the size of this simple host message.

SimpleHostMsg::SetApplicationType

Sets the MSN Direct service type for this simple host message.

SimpleHostMsg::SetCRC

Computes the Cyclic Redundancy Check (CRC) value for this simple host message.

SimpleHostMsg::SetErrorCode

Sets the error code for this message.

SimpleHostMsg::SetFrame

Writes both the beginning-of-frame bytes and the end-of-frame bytes.

SimpleHostMsg::SetResponse

Sets the last bit of the transaction ID to indicate whether this simple host message is a response message.

SimpleHostMsg::SetTransactionId

Sets the transaction ID of this simple host message.

Remarks

This class inherits from Msg Class.

SimpleHostMsg provides a way to create a simple message that has a payload of one byte and that encodes an error code. For possible values, see MSN Direct Error Code Constants. This class can be used to request data from the MSN Direct receiver, or to send back an acknowledgement and error message from the host device to the receiver.

Requirements

Header DBRLib.h
Library DBRLib.lib
Windows Embedded CE Windows CE 5.0, Windows Embedded NavReady 2009

See Also

Reference

DBR701::PrepareSimpleResponseMessage
MSN Direct Services Classes