Skip to content

wontor/pyasterix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyasterix

EUROCONTROL ASTERIX encoder/decoder

A library that encodes and decodes in the EUROCONTROL ASTERIX format as specified in the document EUROCONTROL-SPEC-0149.

refrence from: https://github.com/vitorafsr/asterixed

sample code:

def bytes2hexstr(_bytes):
    return "".join("%02X" % b for b in _bytes)

hexstr = '15004EFF9FB35B83E40001080001014CFBA315CD2A4A0EAF0AE69555250757D74CFB330005554CFBA31189374B4CFB3319CAC08341C60A00500C000000F500004CFBB3414175D75820006A06D901'
ad = AsterixDecoder(bytearray.fromhex(hexstr))
print(ad.get_result())

ae = AsterixEncoder({'21':ad.get_result()})
hexstr2 = bytes2hexstr(ae.get_result())
print(hexstr2)
assert(hexstr == hexstr2)

About

asterix coder and decoder by python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages