Rammbock
Rammbock copied to clipboard
Cannot use BinaryContainer field as header_filter in server_receives_message
I have a message that doesn't have message fields to it. The message is a type of (ACK)acknowledgement to another message and it contains only header part of the protocol. The protocol is our company's custom protocol and contains binary fields in the header and the Binary Containers name is 'Flags'
How can I verify that the received message is my ACK message?
While doing the
'''
${msg} = Server Receives Message header_filter = Flags
'''
I get the following error
File "C:\Python27\lib\contextlib.py", line 17, in __enter__
return self.gen.next()
File "C:\Python27\lib\site-packages\Rammbock\core.py", line 503, in _receive
msg = node.get_message(self._get_message_template(), **configs)
File "C:\Python27\lib\site-packages\Rammbock\networking.py", line 73, in get_message
return self._get_from_stream(message_template, self._message_stream, timeout=timeout, header_filter=header_filter)
File "C:\Python27\lib\site-packages\Rammbock\networking.py", line 76, in _get_from_stream
return stream.get(message_template, timeout=timeout, header_filter=header_filter)
File "C:\Python27\lib\site-packages\Rammbock\templates\message_stream.py", line 35, in get
if self._matches(header, header_fields, header_filter):
File "C:\Python27\lib\site-packages\Rammbock\templates\message_stream.py", line 60, in _matches
if header[header_filter].bytes != to_bin(fields[header_filter]):
File "C:\Python27\lib\site-packages\Rammbock\message.py", line 38, in __getattr__
return self[name]
File "C:\Python27\lib\site-packages\Rammbock\message.py", line 35, in __getitem__
return self._fields[str(name)]
KeyError: 'bytes'
Can the Individual fields of the Binary container be used as header filters?
Hi, could you provide a simple example in robot syntax, that shows the problem? That would simplify testing this a lot.