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 a power-status message.
Syntax
class PowerStatusMsg : public Msg
Methods
| Method | Description |
|---|---|
Initializes the fields of this class by calling the Init method. |
|
Returns the MSN Direct service type for this power-status message. |
|
Returns the most significant four bits of the internal PowerStatus field in this power-status message. These bits represent the battery status data. |
|
Returns a pointer to the first byte of this power-status message after the beginning-of-frame. |
|
Returns a pointer to the first byte of this power-status message, including the bytes used for framing. |
|
Returns the current power status, which includes both power-supply status and battery status, in a human-readable string. |
|
Returns the least significant bits of the internal PowerStatus field in this power-status message. These bits represent the power-supply data. |
|
Returns the size of this power-status message, subtracting the bytes used for framing. |
|
Returns the size of this power-status message by calling RawMessageSize. |
|
Returns the transaction ID of this power-status message. |
|
Initializes the fields of this class. |
|
Returns true if this power-status message is a response message. |
|
Returns the size of this power-status message. |
|
Sets the MSN Direct service type for this power-status message. |
|
Computes the Cyclic Redundancy Check (CRC) value for this power-status message. |
|
Sets the error code for this power-status message. |
|
Sets the power status, which includes both power-supply status and battery status, for this power-status message. |
|
Sets the last bit of the transaction ID to indicate whether this power-status message is a response message. |
|
Sets the transaction ID for this power-status message. |
Remarks
This class inherits from Msg Class.
This message can be sent by either the MSN Direct receiver or the host device to query power status. When this message is sent by the receiver, the MSN Direct application must query the actual power status of the Windows Embedded NavReady powered device in order to fill in the fields of this message.
If the MSN Direct service type is POWER_STATUS, then the incoming message from the MSN Direct receiver is a power-status message returned as a PowerStatusMsg object instance on a ProcessInMessageFromReceiver call. The MsgFromReceiver::GetApplicationType method must be called to verify for errors. In case of an error, the GetApplicationType method will return PROTOCOL_ERROR. Otherwise, the GetApplicationType method will return POWER_STATUS. In this case, the messageFromReceiver parameter must be typecast to PowerStatusMsg and processed accordingly.
The MSN Direct sample application handles this message by supplying values of "External Power" and "Fully Charged" each time this message is received from the MSN Direct receiver.
Requirements
| Header | DBRLib.h |
| Library | DBRLib.lib |
| Windows Embedded CE | Windows CE 5.0, Windows Embedded NavReady 2009 |