This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Refactored the Binary Encoding implementations #37
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added missing constructors allowing effective subclassing
…Holder It allows reusing the class in helper functions of subclasses
* UOctet is always encoded on 1 byte * String length is unsigned * Long and ULong is always encoded as VarInt
It will contain all code specific to variable binary encoding
All classes are prefixed with the word "Base" and abstract. They are contained within esa.mo.mal.encoder.binary.base package.
* Removed BinaryListDecoder now BinaryDecoder also implements MALListDecoder interface * Extended functionality of BaseBinaryStreamFactory allowing simpler overriding of the produced stream types by child classes.
* BinaryStreamHolder and BinaryBufferHolder are prefixed according to respective binary encoding variant (Base, Fixed, Variable, Split)
dmarszk
force-pushed
the
binary_encoding_refactor
branch
4 times, most recently
from
November 3, 2017 16:24
e5b3d85
to
03e4368
Compare
* Base Binary Encoding implementation is now almost fully abstract, ensuring the Fixed and Variable encoding code is not mixed up * Split Binary Encoding is now based on the Variable Binary Encoding * Patched BigInt (ULong) encoding in Fixed Binary Encoding
Now time encoding can be easily overriden by overriding the StreamFactory class. By default encoders come with Binary Time Handler, encoding Time on 6 and FineTime on 10 bytes. It corresponds to "01000000" and "01000010" P-Field value, respectively for Time and FineTime. Future extensions could include more generic Time Handler, configurable with various P-Field values during runtime.
* Added getStreamHolder, getBufferHolder, and getTimeHandler methods * Made protected constructors public, allowing external classes to construct an enc/decoder reusing internals from other enc/decoder instance Transports like SPP use it to dynamically change header encoder
dmarszk
force-pushed
the
binary_encoding_refactor
branch
from
November 3, 2017 16:53
03e4368
to
4bdae32
Compare
Removed reimplementations of binary encoders. Only SPPVarBinary and SPPFixedBinary factories are needed now, to override timeHandler and preserve backwards compatibility with configuration properties used with SPP-based applications
Removed custom implementation of TCPIP Fixed Binary Encoding Moved TCPIPMessageDecoterFactory from encoding package to the transport package (removing encoding package)
dmarszk
force-pushed
the
binary_encoding_refactor
branch
from
November 3, 2017 17:38
4bdae32
to
34c345b
Compare
dmarszk
changed the title
[WIP] DO NOT MERGE (will be rebased) Refactored the Binary Encoding implementations
Refactored the Binary Encoding implementations
Nov 9, 2017
Please, as the CCSDS_MAL_ENCODING_BINARY was hugely refactored, can you bump the version of the module in the POM? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request has been created to allow early review of binary encoding refactor.
It will be modified with further patches.
This set of changes corrects baseline binary encoding implementations, allowing reuse of them by the transport bindings, thus reducing amount of encoding code within transport binding implementations (most notably SPP, ZMTP, TCPIP).
Outline of the changes:
1.1. Base Binary Encoding (inherits from GEN encoding)
1.2. Fixed Binary Encoding (inherits from Base)
1.3. Variable Binary Encoding (inherits from Base)
1.4. Split Binary Encoding (inherits from Variable)