Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
scale=Scale(floatScale=2.3),
units='btusPerPoundDryAir',
)
if _debug: _log.debug(" - accumulator: %r", accumulator)
# add it to the device
this_application.add_object(accumulator)
if _debug: _log.debug(" - object list: %r", this_device.objectList)
# create a task that bumps the value by one every 10 seconds
pulse_task = PulseTask(accumulator, 1, 10 * 1000)
if _debug: _log.debug(" - pulse_task: %r", pulse_task)
_log.debug("running")
run()
_log.debug("fini")
this_device = LocalDeviceObject(ini=args.ini)
if _debug: _log.debug(" - this_device: %r", this_device)
# make a simple application
this_application = BIPSimpleApplication(this_device, args.ini.address)
# make a console
this_console = ReadRangeConsoleCmd()
if _debug: _log.debug(" - this_console: %r", this_console)
# enable sleeping will help with threads
enable_sleeping()
_log.debug("running")
run()
_log.debug("fini")
# make a simple application
this_application = EventNotificationApplication(
this_device, args.ini.address,
)
if _debug: _log.debug(" - this_application: %r", this_application)
# make a console
this_console = EventNotificationConsoleCmd()
if _debug: _log.debug(" - this_console: %r", this_console)
# enable sleeping will help with threads
enable_sleeping()
_log.debug("running")
run()
_log.debug("fini")
if _debug: _log.debug("initialization")
if _debug: _log.debug(" - args: %r", args)
# make a device object
this_device = LocalDeviceObject(ini=args.ini)
if _debug: _log.debug(" - this_device: %r", this_device)
# make a simple application
this_application = ReadPointListApplication(point_list, this_device, args.ini.address)
# fire off a request when the core has a chance
deferred(this_application.next_request)
_log.debug("running")
run()
# dump out the results
for request, response in zip(point_list, this_application.response_values):
print(request, response)
_log.debug("fini")
vlan.add_node(vlan_app.vlan_node)
_log.debug(" - vlan_app: %r", vlan_app)
# make a random value object
ravo = RandomAnalogValueObject(
objectIdentifier=('analogValue', 1),
objectName='Random-1-%d' % (device_instance,),
)
_log.debug(" - ravo: %r", ravo)
# add it to the device
vlan_app.add_object(ravo)
_log.debug("running")
run()
_log.debug("fini")
vendorIdentifier=15,
)
_log.debug(" - this_device: %r", this_device)
# make the application, add it to the network
this_application = VLANApplication(this_device, vlan_address)
vlan.add_node(this_application.vlan_node)
_log.debug(" - this_application: %r", this_application)
# make a console
this_console = WhoIsIAmConsoleCmd()
if _debug: _log.debug(" - this_console: %r", this_console)
_log.debug("running")
run()
_log.debug("fini")
snapshot = Snapshot()
# read in an existing snapshot
if args.infile != '-':
snapshot.read_file(args.infile)
# make a console
this_console = DiscoverConsoleCmd()
_log.debug(" - this_console: %r", this_console)
# enable sleeping will help with threads
enable_sleeping()
_log.debug("running")
run()
_log.debug("fini")
# write out the snapshot, outfile defaults to infile if not specified
if args.outfile == '-unspecified-':
args.outfile = args.infile
if args.outfile != '-':
snapshot.write_file(args.outfile)
# make a simple application
this_application = ReadObjectListApplication(this_device, args.ini.address)
# build a device object identifier
device_id = ('device', args.device_id)
# translate the address
device_addr = Address(args.device_addr)
# kick off the process after the core is up and running
deferred(this_application.read_object_list, device_id, device_addr)
_log.debug("running")
run()
_log.debug("fini")
# create a director listening to the address
this_director = TCPServerDirector(server_address)
if _debug: _log.debug(" - this_director: %r", this_director)
# create an echo
echo_master = EchoMaster()
if _debug: _log.debug(" - echo_master: %r", echo_master)
# bind everything together
bind(echo_master, this_director)
bind(MiddleManASE(), this_director)
_log.debug("running")
run()
_log.debug("fini")
vlan.add_node(vlan_app.vlan_node)
_log.debug(" - vlan_app: %r", vlan_app)
# make a random value object
ravo = RandomAnalogValueObject(
objectIdentifier=('analogValue', 1),
objectName='Device%d/Random1' % (device_instance,),
)
_log.debug(" - ravo1: %r", ravo)
# add it to the device
vlan_app.add_object(ravo)
_log.debug("running")
run()
_log.debug("fini")