Protocol

KISS Protocol

KISS framing.

class kv4p.protocol.kiss.KissParser(on_frame)[source]

Bases: object

Incremental KISS frame parser.

Parameters:

on_frame (Callable[[int, bytes], None])

__init__(on_frame)[source]
Parameters:

on_frame (Callable[[int, bytes], None])

Return type:

None

feed(data)[source]

Feed serial bytes.

Parameters:

data (bytes)

Return type:

None

kv4p.protocol.kiss.encode_kiss_frame(command, payload)[source]

Encode a KISS frame.

Parameters:
  • command (int)

  • payload (bytes)

Return type:

bytes