com.esf.device.modem.channel.service
Class CnS

java.lang.Object
  extended by com.esf.device.modem.channel.service.CnS

public class CnS
extends java.lang.Object

Describes CnS object.

CnS format:

Byte offset Content
0-1Object ID
2Operation Type
3Reserved
4-7Application ID
8-9Length of payload (0–246)
[10-255]Parameter (if needed for the object)

The maximum length of a CnS message is 255 bytes. The minimum length is 10.

Author:
ilya.binshtok

Field Summary
static int C8xx_APPLICATION_ID
          CnS 'C8xx Application' ID
static int MC572x_APPLICATION_ID
          CnS 'MC572x Application' ID
static int MC87xx_APPLICATION_ID
          CnS 'MC87xx Application' ID
static int MODEM_CHANNEL_APPLICATION_ID
          CnS 'Channel Application' object ID
static int OBJID_FIRMWARE_VERSION_ID
          CnS 'Firmware Version' object ID
static byte OPTYPE_ERROR
          CnS Operation Type - 'Error'
static byte OPTYPE_GET
          CnS Operation Type - 'GetRequest'
static byte OPTYPE_GETREP
          CnS Operation Type - reply to 'GetRequest'
static byte OPTYPE_NOTIF_DISABLE
          CnS Operation Type - 'Notification Disable'
static byte OPTYPE_NOTIF_DISABLE_ACK
          CnS Operation Type - acknowledge to 'Notification Disable'
static byte OPTYPE_NOTIF_ENB
          CnS Operation Type - 'NotificationEnable'
static byte OPTYPE_NOTIF_ENB_REP
          CnS Operation Type - reply to 'NotificationEnable'
static byte OPTYPE_NOTIFICATION
          CnS Operation Type - 'Notification'
static byte OPTYPE_SET
          CnS Operation Type - 'Set' (CnS command)
static byte OPTYPE_SETACK
          CnS Operation Type - 'SetAck' (acknowledge to Set)
static int PAYLOAD_OFFSET
          CnS offset number of bytes into the payload
static int USB598_APPLICATION_ID
          CnS 'USB 598 Application' ID
 
Constructor Summary
CnS(byte[] msg)
          CnS reply constructor.
CnS(int objectID, byte opType, int appID)
          CnS message constructor.
CnS(int objectID, byte opType, int appID, byte[] pload)
          CnS message constructor
CnS(int objectID, byte opType, int appID, int param)
          CnS message constructor
CnS(int objectID, byte opType, int appID, long param)
          CnS message constructor
 
Method Summary
 long getApplicationId()
          Reports CnS Application ID
 int getObjectId()
          Reports CnS object ID
 int getOperationType()
          Reports CnS operation type
 byte[] getPayload()
          Reports payload of CnS message
 int getPayloadLength()
          Reports the length of Cns payload
 byte[] getRequest()
          Reports CnS request
 int getReserved()
          Reports reserved word
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEM_CHANNEL_APPLICATION_ID

public static final int MODEM_CHANNEL_APPLICATION_ID
CnS 'Channel Application' object ID

See Also:
Constant Field Values

MC572x_APPLICATION_ID

public static final int MC572x_APPLICATION_ID
CnS 'MC572x Application' ID

See Also:
Constant Field Values

MC87xx_APPLICATION_ID

public static final int MC87xx_APPLICATION_ID
CnS 'MC87xx Application' ID

See Also:
Constant Field Values

C8xx_APPLICATION_ID

public static final int C8xx_APPLICATION_ID
CnS 'C8xx Application' ID

See Also:
Constant Field Values

USB598_APPLICATION_ID

public static final int USB598_APPLICATION_ID
CnS 'USB 598 Application' ID

See Also:
Constant Field Values

OBJID_FIRMWARE_VERSION_ID

public static final int OBJID_FIRMWARE_VERSION_ID
CnS 'Firmware Version' object ID

See Also:
Constant Field Values

OPTYPE_GET

public static final byte OPTYPE_GET
CnS Operation Type - 'GetRequest'

See Also:
Constant Field Values

OPTYPE_GETREP

public static final byte OPTYPE_GETREP
CnS Operation Type - reply to 'GetRequest'

See Also:
Constant Field Values

OPTYPE_SET

public static final byte OPTYPE_SET
CnS Operation Type - 'Set' (CnS command)

See Also:
Constant Field Values

OPTYPE_SETACK

public static final byte OPTYPE_SETACK
CnS Operation Type - 'SetAck' (acknowledge to Set)

See Also:
Constant Field Values

OPTYPE_NOTIF_ENB

public static final byte OPTYPE_NOTIF_ENB
CnS Operation Type - 'NotificationEnable'

See Also:
Constant Field Values

OPTYPE_NOTIF_ENB_REP

public static final byte OPTYPE_NOTIF_ENB_REP
CnS Operation Type - reply to 'NotificationEnable'

See Also:
Constant Field Values

OPTYPE_NOTIFICATION

public static final byte OPTYPE_NOTIFICATION
CnS Operation Type - 'Notification'

See Also:
Constant Field Values

OPTYPE_NOTIF_DISABLE

public static final byte OPTYPE_NOTIF_DISABLE
CnS Operation Type - 'Notification Disable'

See Also:
Constant Field Values

OPTYPE_NOTIF_DISABLE_ACK

public static final byte OPTYPE_NOTIF_DISABLE_ACK
CnS Operation Type - acknowledge to 'Notification Disable'

See Also:
Constant Field Values

OPTYPE_ERROR

public static final byte OPTYPE_ERROR
CnS Operation Type - 'Error'

See Also:
Constant Field Values

PAYLOAD_OFFSET

public static final int PAYLOAD_OFFSET
CnS offset number of bytes into the payload

See Also:
Constant Field Values
Constructor Detail

CnS

public CnS(int objectID,
           byte opType,
           int appID)
CnS message constructor.

CnS request constructor

Parameters:
objectID - - object ID
opType - - operation type
appID - - application ID

CnS

public CnS(int objectID,
           byte opType,
           int appID,
           byte[] pload)
CnS message constructor

Parameters:
objectID - - object ID
opType - - operation type
appID - - application ID
pload - CnS payload

CnS

public CnS(int objectID,
           byte opType,
           int appID,
           int param)
CnS message constructor

Parameters:
objectID - - object ID
opType - - operation type
appID - - application ID
param - - payload

CnS

public CnS(int objectID,
           byte opType,
           int appID,
           long param)
CnS message constructor

Parameters:
objectID - - object ID
opType - - operation type
appID - - application ID
param - - payload

CnS

public CnS(byte[] msg)
CnS reply constructor.

Parameters:
msg - byte array to hold CnS reply from modem
Method Detail

getRequest

public byte[] getRequest()
Reports CnS request

Returns:
CnS request as byte array

getPayload

public byte[] getPayload()
Reports payload of CnS message

Returns:
payload as byte array

getApplicationId

public long getApplicationId()
Reports CnS Application ID

Returns:
application ID

getObjectId

public int getObjectId()
Reports CnS object ID

Returns:
object ID

getOperationType

public int getOperationType()
Reports CnS operation type

Returns:
operation type

getPayloadLength

public int getPayloadLength()
Reports the length of Cns payload

Returns:
payload length

getReserved

public int getReserved()
Reports reserved word

Returns:
- reserved word