This file contains hidden or 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
""" | |
Simple example of a BACnet/IP application that runs multiple applications on the same host. | |
""" | |
import asyncio | |
from argparse import Namespace | |
from bacpypes3.app import Application | |
async def main() -> None: |
This file contains hidden or 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
""" | |
This example "intercepts" the NPDU coming up from a bottom layer and stores | |
the source address into the pduUserData attribute which is passed up through | |
the layers and reaches the application. | |
""" | |
import asyncio | |
from typing import List, Optional | |
from bacpypes3.debugging import ModuleLogger, bacpypes_debugging |
This file contains hidden or 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
""" | |
An example with lots of local objects. | |
""" | |
import asyncio | |
from random import random | |
from bacpypes3.debugging import ModuleLogger | |
from bacpypes3.argparse import SimpleArgumentParser | |
from bacpypes3.ipv4.app import Application |
This file contains hidden or 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
[ | |
{ | |
"process-identifier": 1, | |
"initiating-device-identifier": "device,999", | |
"event-object-identifier": "analog-value,1", | |
"time-stamp": { | |
"time": "01:02:03" | |
}, | |
"notification-class": 1, | |
"priority": 0, |
This file contains hidden or 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
import asyncio | |
from bacpypes3.debugging import ModuleLogger | |
from bacpypes3.argparse import SimpleArgumentParser | |
from bacpypes3.app import Application | |
from bacpypes3.local.analog import AnalogValueObject | |
from bacpypes3.local.binary import BinaryValueObject | |
_debug = 0 |
This file contains hidden or 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
import sys | |
import os | |
import os.path | |
import streamlit as st | |
from streamlit.logger import get_logger | |
# humph | |
# utils_path = os.path.realpath(os.path.pardir) | |
# if utils_path not in sys.path: |
This file contains hidden or 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
import sys | |
from bacpypes.debugging import btox | |
from bacpypes.pdu import Address, PDU | |
from bacpypes.pdu import PDU | |
from bacpypes.apdu import APDU, ReadPropertyRequest | |
from bacpypes.npdu import NPDU | |
from bacpypes.analysis import decode_packet |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
This application presents a 'console' prompt to the user asking for Who-Is | |
commands which create the related APDUs and sends them through a "fuzz" layer | |
for additional processing. | |
""" | |
from bacpypes.debugging import bacpypes_debugging, ModuleLogger | |
from bacpypes.consolelogging import ConfigArgumentParser |
This file contains hidden or 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
#!/usr/bin/env python | |
""" | |
This is a clone of the ReadProperty.py sample application that does not | |
support the Who-Is and Read-Property services (which are provided by default) | |
making this essentially a client-only device. | |
Note that it is not completely stealthy, it will respond with a Reject if | |
it is sent a Read-Property request. | |
""" |
This file contains hidden or 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
{ | |
"avar": 74.1, | |
"bvar": "inactive" | |
} |
NewerOlder