C# Class Subaru.SSM2.Ssm2InitResponse

Init response packet. This packet type is usually created by control unit and sent to the tester. Packet consists of: 5 byte header + 3 SSMID + 5 ROMID + X capability bytes + 1 checksum. Capability bytes length is not constant, usually 32, 48 or 96 bytes seen so far.
Inheritance: Ssm2Packet
Mostra file Open project: src0x/LibSSM2 Class Usage Examples

Public Methods

Method Description
Check ( ) : bool
GetCapabilities ( ) : byte[]

Returns a copy of the capability bytes. (Lengths of 32 = 0x20, 48 = 0x30 or 96 = 0x60 bytes seen so far.)

GetRomID ( ) : byte[]

Returns a copy of the 5 ROMID bytes.

GetSsmID ( ) : byte[]

Return a copy of the 3 SSMID bytes.

SetCapabilities ( byte capabilities ) : void

Set capability bytes.

SetRomID ( byte romID ) : void

Sets ROMID.

SetSsmID ( byte ssmID ) : void

Sets SSMID

Ssm2InitResponse ( ) : System
Ssm2InitResponse ( Ssm2Device destination, Ssm2Device source, byte ssmID, byte romID, byte capabilities ) : System

Creates a complete InitResponse packet.

Ssm2InitResponse ( byte buffer ) : System

Protected Methods

Method Description
SetConstBytes ( ) : void

Private Methods

Method Description
CopyPart ( int index, int length ) : byte[]
TakePart ( byte bytes, int index, int length ) : void

Method Details

Check() public method

public Check ( ) : bool
return bool

GetCapabilities() public method

Returns a copy of the capability bytes. (Lengths of 32 = 0x20, 48 = 0x30 or 96 = 0x60 bytes seen so far.)
public GetCapabilities ( ) : byte[]
return byte[]

GetRomID() public method

Returns a copy of the 5 ROMID bytes.
public GetRomID ( ) : byte[]
return byte[]

GetSsmID() public method

Return a copy of the 3 SSMID bytes.
public GetSsmID ( ) : byte[]
return byte[]

SetCapabilities() public method

Set capability bytes.
/// Length out of range. Must be greater than 1. ///
public SetCapabilities ( byte capabilities ) : void
capabilities byte /// Capabilities. ///
return void

SetConstBytes() protected method

protected SetConstBytes ( ) : void
return void

SetRomID() public method

Sets ROMID.
Array length must be 5.
public SetRomID ( byte romID ) : void
romID byte /// Always 5 bytes e.g. "{0x1B, 0x14, 0x40, 0x05, 0x05}". ///
return void

SetSsmID() public method

Sets SSMID
Array length must be 3.
public SetSsmID ( byte ssmID ) : void
ssmID byte /// Always 3 bytes e.g. "{0xA2, 0x10, 0x12}". ///
return void

Ssm2InitResponse() public method

public Ssm2InitResponse ( ) : System
return System

Ssm2InitResponse() public method

Creates a complete InitResponse packet.
public Ssm2InitResponse ( Ssm2Device destination, Ssm2Device source, byte ssmID, byte romID, byte capabilities ) : System
destination Ssm2Device
source Ssm2Device
ssmID byte
romID byte
capabilities byte
return System

Ssm2InitResponse() public method

public Ssm2InitResponse ( byte buffer ) : System
buffer byte
return System