Sha256: 8f2b69e856b222938c118c67515adc34fe6102e635b48a4d67633eb4e5d88329

Contents?: true

Size: 768 Bytes

Versions: 2

Compression:

Stored size: 768 Bytes

Contents

from javonet.core.interpreter.Interpreter import Interpreter
from javonet.core.protocol.CommandSerializer import CommandSerializer
from javonet.utils.connectionData.InMemoryConnectionData import InMemoryConnectionData


class Receiver:

    def __init__(self):
        self.connection_data = InMemoryConnectionData()

    def SendCommand(self, message_byte_array, messageByteArrayLen):
        return bytearray(CommandSerializer().serialize(Interpreter().process(message_byte_array), self.connection_data))

    def HeartBeat(self, message_byte_array, messageByteArrayLen):
        response_byte_array = bytearray(2)
        response_byte_array[0] = message_byte_array[11]
        response_byte_array[1] = message_byte_array[12] - 2
        return response_byte_array

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.5.2 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.5.1 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py