MarketSquare / MarketSquare/Rammbock

new_protocol has no way to set endianess

Open
#63 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
64
Forks
48
PR merge metrics
No merged PRs in 30d

Description

In the function `new_protocol`

```
def new_protocol(self, protocol_name):
"""Start defining a new protocol template.

All messages sent and received from a connection that uses a protocol
have to conform to this protocol template.
"""
if self._protocol_in_progress:
raise Exception('Can not start a new protocol definition in middle of old.')
if protocol_name in self._protocols:
raise Exception('Protocol %s already defined' % protocol_name)
self._init_new_message_stack(Protocol(protocol_name, library=self))
self._protocol_in_progress = True
```
The line `self._init_new_message_stack(Protocol(protocol_name, library=self))` gives no option to set the Protocol constructor option for `little_endian`. Neither does the `new_protocol` method.

So, there does not seem to be a way to use the robot api, and have this little_endian feature. It would be very useful if the endian setting could be set from the robot api.

At least, that's how it looks to me atm.

Thanks for reviewing this issue.

Cheers,
Matt

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the new_protocol function and the Protocol constructor it calls. Trace how protocol definitions are exposed through the Robot API and how the little_endian option is handled. Done means a Robot API protocol can select the endian setting and the behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.