https://github.com/ibmstreams/streamsx.bytes
(Incubation) Functions to manipulate data and an operator to parse a message and extract bits from it based on a JSON definition
https://github.com/ibmstreams/streamsx.bytes
ibm-streams stream-processing
Last synced: about 1 month ago
JSON representation
(Incubation) Functions to manipulate data and an operator to parse a message and extract bits from it based on a JSON definition
- Host: GitHub
- URL: https://github.com/ibmstreams/streamsx.bytes
- Owner: IBMStreams
- Created: 2014-05-21T01:30:03.000Z (almost 11 years ago)
- Default Branch: develop
- Last Pushed: 2020-11-10T09:34:45.000Z (over 4 years ago)
- Last Synced: 2025-01-23T18:50:34.350Z (3 months ago)
- Topics: ibm-streams, stream-processing
- Language: C++
- Homepage: https://ibmstreams.github.io/streamsx.bytes
- Size: 3.17 MB
- Stars: 0
- Watchers: 5
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
streamsx.bytes
==============
The toolkit requires `jannson` and `jannson-devel` packages in order to parse JSONThis toolkit provides
Functions to manipulate data and an operator to parse a message and extract bits from it based on a JSON definition
Conversion
decodeBase64 : Decode a base64 string
MQ== -> 1encodeBase64 : Encode a string into it's base64 representation
IBM -> SUJNconvertFromASCIIToHex : Convert an ASCII string into Hexadecimal string
22 -> 3232convertFromHexToASCII : Convert an Hexadecimal string into an ASCII string
49424D -> IBMconvertFromASCIIToBinary : Convert an ASCII string into a Binary string
22 -> 0011001000110010convertFromBinaryToASCII : Convert a Binary string into an ASCII string
010010010100001001001101 -> IBMconvertFromHexToBinary : Convert an Hexadecimal string into a Binary string
3232 -> 0011001000110010convertFromBinaryToHex : Convert a Binary string into an Hexadecimal string
010010010100001001001101 -> 49424DTransformation
getBitStringFromInt : Get the Binary string of an integer
18178 -> 0100011100000010getBitStringFromUnsignedInt : Get the Binary string of an unsigned integer
18178 -> 0100011100000010getUnsignedIntFromBinaryString : Get the unsigned int represented by a Binary string
0100011100000010 -> 18178rotateLeft : Rotate a Binary string to the left
0100011100000010 -> 0000001001000111 (ROL 8)rotateRight : Rotate a Binary string to the right
0100011100000010 -> 0010010001110000 (ROR 4)getValueFromBinaryString : Get the value (float64) of a Binary string using the formula y=factor * x + offset
with the precision you specified (%.xf) and applying correction if limit is specified
1100000010("%.3f",0.0625,-32,512) -> -15.875
00111011111("%.9f",0.17578125,100,0) -> 184.19921875
Operator to parse messageBytesParse : Operator that parse a message using a message definition provided in a JSON format.
The definition is provided as a parameter
The tuple for the output port must contain the ExtractedParameter schema (provided by the toolkit).A punctuation is generated when the input message is parsed.
Type
ExtractedParameter : The tuple schema for parsed data