Package libprs500 :: Module prstypes :: Class Response
[hide private]
[frames] | no frames]

Class Response

source code


Defines the structure of response packets received from the device.

Response inherits from Command as the first 16 bytes have the same structure.

Instance Methods [hide private]
  __init__(self, packet)
len(packet) == Response.SIZE

Inherited from TransferBuffer: __add__, __getslice__, __str__, pack, unpack

Inherited from TransferBuffer (private): _normalize

Inherited from list: __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__


Class Methods [hide private]

Inherited from TransferBuffer: phex


Class Variables [hide private]
  SIZE = 32
Size of response packets in the SONY protocol
  rnumber = An unsigned int stored in 4 bytes starting at byte 16
Response number, the command number of a command packet sent sometime before this packet was received
  code = An unsigned int stored in 4 bytes starting at byte 20
Used to indicate error conditions.
  data_size = An unsigned int stored in 4 bytes starting at byte 28
Used to indicate the size of the next bulk read

Inherited from Command: length, number, type


Properties [hide private]
  data
The last 3 DWORDs (12 bytes) of data in this response packet.

Inherited from object: __class__


Method Details [hide private]

__init__(self, packet)
(Constructor)

source code 
len(packet) == Response.SIZE
Overrides: Command.__init__

Class Variable Details [hide private]

SIZE

Size of response packets in the SONY protocol
Value:
32                                                                    
      

rnumber

Response number, the command number of a command packet sent sometime before this packet was received
Value:
An unsigned int stored in 4 bytes starting at byte 16                  
      

code

Used to indicate error conditions. A value of 0 means there was no error
Value:
An unsigned int stored in 4 bytes starting at byte 20                  
      

data_size

Used to indicate the size of the next bulk read
Value:
An unsigned int stored in 4 bytes starting at byte 28                  
      

Property Details [hide private]

data

The last 3 DWORDs (12 bytes) of data in this response packet. Returned as a list of unsigned integers.
Get Method:
unreachable.fget(self)
Set Method:
unreachable.fset(self, val)
Delete Method:
None