Sha256: 4f1b648b266a1526b6c60970586033c7ddbceafae9033d77bdebdec3363a2499

Contents?: true

Size: 738 Bytes

Versions: 6

Compression:

Stored size: 738 Bytes

Contents

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


class Receiver:

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

    def SendCommand(self, messageByteArray, messageByteArrayLen):
        return bytearray(self.python_interpreter.process(messageByteArray, len(messageByteArray), self.connection_data))

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

Version data entries

6 entries across 4 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.5.0 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.4.11 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/receiver/Receiver.py
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/receiver/Receiver.py