Class: LevinPacket

LevinPacket(dataopt)

new LevinPacket(dataopt)

Initializes a new Levin Packet
Parameters:
Name Type Attributes Description
data string | number <optional>
the hexadecimal representation of an existing Levin Packet or the command number for a new packet
Source:

Members

(readonly) blob :string

The hexadecimal representation of the packet
Type:
  • string
Source:

(readonly) buffer :Buffer

The packet as a Buffer
Type:
  • Buffer
Source:

command :number

The command this packet is for
Type:
  • number
Default Value:
  • 0
Source:

flags :number

The packet flag(s)
Type:
  • number
Default Value:
  • 0
Source:

payload :LevinPayload

The payload contained within the packet
Type:
Source:

(readonly) payloadLength :number

The length of the payload in bytes
Type:
  • number
Source:

protocolVersion :number

The level protocol version
Type:
  • number
Default Value:
  • 1
Source:

returnCode :number

The return code of the packet
Type:
  • number
Default Value:
  • 0
Source:

returnData :boolean

Whether this packet is in response to a request
Type:
  • boolean
Default Value:
  • false
Source:

signature :string

The levin packet signature
Type:
  • string
Default Value:
  • 0101010101012101
Source: