AcraNetwork


NameAcraNetwork JSON
Version 0.17.3 PyPI version JSON
download
home_pagehttps://github.com/diarmuidcwc/AcraNetwork
SummaryClasses and utilities to support Flight Test Instrumentation Ethernet networks
upload_time2024-04-26 10:16:21
maintainerNone
docs_urlNone
authorDiarmuid Collins
requires_python>=3.7
licenseGNU GPLv3
keywords acra inetx fti iena
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            AcraNetwork 
===========

A collection of classes that can be used to decom network or PCM based FTI traffic


Summary
~~~~~~~


* iNetX : Class for packing and unpacking iNetX objects
* IENA  : Class for packing and unpacking IENA objects
* SimpleEthernet : A  simplified set of classes for Ethernet, IP and UDP packets. These are not fully featured is sufficient for the network systems used in the KAM500 networks
* Pcap : Class and helper methods for reading pcap files
* McastSocket : Class to bind to ports to capture multicast packets

Install
~~~~~~~

Install using the standard setuptools install method

.. code-block::

	python setup.py install


or clone this repository to your local directory

.. code-block::

	git clone https://github.com/diarmuidcwc/AcraNetwork.git


Usage
~~~~~

Here are two brief examples on how to create and read a pcap file. Further examples can be viewed in the examples
directory or in the unittest folder

To read in a pcap file with multiple ethernet packets all containing an iNetX packet wrapped in UDP

.. code-block:: python

	import AcraNetwork.iNetX as inetx
	import AcraNetwork.SimpleEthernet as SimpleEthernet
	import AcraNetwork.Pcap as pcap

	import struct
	mypcap = pcap.Pcap("inetx_test.pcap")       # Read the pcap file
	for mypcaprecord in mypcap:

		ethpacket = SimpleEthernet.Ethernet()   # Create an Ethernet object
		ethpacket.unpack(mypcaprecord.packet)   # Unpack the pcap record into the eth object
		ippacket =  SimpleEthernet.IP()         # Create an IP packet
		ippacket.unpack(ethpacket.payload)      # Unpack the ethernet payload into the IP packet
		udppacket = SimpleEthernet.UDP()        # Create a UDP packet
		udppacket.unpack(ippacket.payload)      # Unpack the IP payload into the UDP packet
		inetxpacket = inetx.iNetX()             # Create an iNetx object
		inetxpacket.unpack(udppacket.payload)   # Unpack the UDP payload into this iNetX object
		print("INETX: StreamID ={:08X} Sequence = {:8d} PTP Seconds = {}".format(inetxpacket.streamid,inetxpacket.sequence,inetxpacket.ptptimeseconds))


To Make a Distribution
~~~~~~~~~~~~~~~~~~~~~~

.. code-block::

	pip  install --upgrade pip wheel setuptools twine
	rm dist/*
	python ./setup.py sdist bdist_wheel --universal sdist
	twine upload dist/*

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/diarmuidcwc/AcraNetwork",
    "name": "AcraNetwork",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "ACRA, iNetX, FTI, IENA",
    "author": "Diarmuid Collins",
    "author_email": "dcollins@curtisswright.com",
    "download_url": "https://files.pythonhosted.org/packages/5d/44/d9b4296a01cd123f5431ba9f9adcaadfe5edc8db38c2ed295df263278c14/AcraNetwork-0.17.3.tar.gz",
    "platform": null,
    "description": "AcraNetwork \n===========\n\nA collection of classes that can be used to decom network or PCM based FTI traffic\n\n\nSummary\n~~~~~~~\n\n\n* iNetX : Class for packing and unpacking iNetX objects\n* IENA  : Class for packing and unpacking IENA objects\n* SimpleEthernet : A  simplified set of classes for Ethernet, IP and UDP packets. These are not fully featured is sufficient for the network systems used in the KAM500 networks\n* Pcap : Class and helper methods for reading pcap files\n* McastSocket : Class to bind to ports to capture multicast packets\n\nInstall\n~~~~~~~\n\nInstall using the standard setuptools install method\n\n.. code-block::\n\n\tpython setup.py install\n\n\nor clone this repository to your local directory\n\n.. code-block::\n\n\tgit clone https://github.com/diarmuidcwc/AcraNetwork.git\n\n\nUsage\n~~~~~\n\nHere are two brief examples on how to create and read a pcap file. Further examples can be viewed in the examples\ndirectory or in the unittest folder\n\nTo read in a pcap file with multiple ethernet packets all containing an iNetX packet wrapped in UDP\n\n.. code-block:: python\n\n\timport AcraNetwork.iNetX as inetx\n\timport AcraNetwork.SimpleEthernet as SimpleEthernet\n\timport AcraNetwork.Pcap as pcap\n\n\timport struct\n\tmypcap = pcap.Pcap(\"inetx_test.pcap\")       # Read the pcap file\n\tfor mypcaprecord in mypcap:\n\n\t\tethpacket = SimpleEthernet.Ethernet()   # Create an Ethernet object\n\t\tethpacket.unpack(mypcaprecord.packet)   # Unpack the pcap record into the eth object\n\t\tippacket =  SimpleEthernet.IP()         # Create an IP packet\n\t\tippacket.unpack(ethpacket.payload)      # Unpack the ethernet payload into the IP packet\n\t\tudppacket = SimpleEthernet.UDP()        # Create a UDP packet\n\t\tudppacket.unpack(ippacket.payload)      # Unpack the IP payload into the UDP packet\n\t\tinetxpacket = inetx.iNetX()             # Create an iNetx object\n\t\tinetxpacket.unpack(udppacket.payload)   # Unpack the UDP payload into this iNetX object\n\t\tprint(\"INETX: StreamID ={:08X} Sequence = {:8d} PTP Seconds = {}\".format(inetxpacket.streamid,inetxpacket.sequence,inetxpacket.ptptimeseconds))\n\n\nTo Make a Distribution\n~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block::\n\n\tpip  install --upgrade pip wheel setuptools twine\n\trm dist/*\n\tpython ./setup.py sdist bdist_wheel --universal sdist\n\ttwine upload dist/*\n",
    "bugtrack_url": null,
    "license": "GNU GPLv3",
    "summary": "Classes and utilities to support Flight Test Instrumentation Ethernet networks",
    "version": "0.17.3",
    "project_urls": {
        "Homepage": "https://github.com/diarmuidcwc/AcraNetwork"
    },
    "split_keywords": [
        "acra",
        " inetx",
        " fti",
        " iena"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20a8aabd50b818b86185036a31265067aec64ae8ff5859fa1dde852f16033605",
                "md5": "cfdb40c56c530355a255516c82629f90",
                "sha256": "ee09a6eaf2173b9fd46684c38a8010f1ab02769b67317a254998e18ca57cffa3"
            },
            "downloads": -1,
            "filename": "AcraNetwork-0.17.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cfdb40c56c530355a255516c82629f90",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 103386,
            "upload_time": "2024-04-26T10:16:19",
            "upload_time_iso_8601": "2024-04-26T10:16:19.291283Z",
            "url": "https://files.pythonhosted.org/packages/20/a8/aabd50b818b86185036a31265067aec64ae8ff5859fa1dde852f16033605/AcraNetwork-0.17.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d44d9b4296a01cd123f5431ba9f9adcaadfe5edc8db38c2ed295df263278c14",
                "md5": "dec40e9e4f4851dee2ca5acf43dcd479",
                "sha256": "37bdbbde14ed6529840184f01cecbdc9322c80b644efd3c61ea53626c9335a50"
            },
            "downloads": -1,
            "filename": "AcraNetwork-0.17.3.tar.gz",
            "has_sig": false,
            "md5_digest": "dec40e9e4f4851dee2ca5acf43dcd479",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 99784,
            "upload_time": "2024-04-26T10:16:21",
            "upload_time_iso_8601": "2024-04-26T10:16:21.122265Z",
            "url": "https://files.pythonhosted.org/packages/5d/44/d9b4296a01cd123f5431ba9f9adcaadfe5edc8db38c2ed295df263278c14/AcraNetwork-0.17.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 10:16:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "diarmuidcwc",
    "github_project": "AcraNetwork",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "acranetwork"
}
        
Elapsed time: 0.25870s