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 | |
""" | |
Configured with a subscription context object which is passed to the | |
application, it sends a SubscribeCOVRequest and listens for confirmed or | |
unconfirmed COV notifications, lines them up with the context, and passes the | |
APDU to the context to print out. | |
Making multiple subscription contexts and keeping them active based on their | |
lifetime is left as an exercise for the reader. |
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 read commands | |
which create ReadPropertyRequest PDUs, then lines up the coorresponding ReadPropertyACK | |
and prints the value. | |
""" | |
import sys |
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 creates an application layer state machine which sends | |
a Read Property Request and then quits after the ack is received. | |
The state_machine module is almost identical to the one in the tests directory | |
with the exception that the TrafficLog class has been removed as well as | |
its reliance on the time_machine module. | |
""" |
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/python | |
""" | |
""" | |
import sys | |
from bacpypes.debugging import bacpypes_debugging, ModuleLogger | |
from bacpypes.primitivedata import Boolean, Unsigned, Integer, Real, BitString, Enumerated, Date, Time | |
from bacpypes.basetypes import ErrorType, StatusFlags, LogStatus, LogRecord, LogRecordLogDatum, DateTime |
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 to save and | |
restore a recipient list from a notification class object, or re-write one to | |
the local device. It also listens and acknowledges incoming event notifications. | |
""" | |
import os | |
import sys |
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 generates a Who-Is request at startup and collects the I-Am | |
responses into a list for more processing. | |
""" | |
import sys | |
from bacpypes.debugging import bacpypes_debugging, ModuleLogger |
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 | |
""" | |
A web server based on flask that reads properties from objects and returns an | |
HTML page of the results. | |
""" | |
from flask import Flask | |
from jinja2 import Template | |
from threading import Thread |
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
""" | |
RPC server, aioamqp implementation of RPC examples from RabbitMQ tutorial | |
""" | |
import asyncio | |
import logging | |
import signal | |
import aioamqp | |
from aioamqp.protocol import AmqpProtocol |
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
# -*- coding: utf-8 -*- | |
import sys | |
from io import BytesIO | |
from rdflib import Graph | |
from pyshacl.validate import Validator | |
data = b""" | |
@prefix bakery: <http://bakery.com/ns#> . |
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 generates a Who-Is request at startup and collects the I-Am | |
responses into a list, then reads various properties of the device objects, | |
then outputs the content as a JSON document. | |
""" | |
import sys | |
import json |
OlderNewer