Esempio n. 1
0
def run_bacrp(ctx, device_id, object_id, instance_id, property_id):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# Eyed に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	if client.getStatus() == False:
		click.echo('BACnetd is not running...')
		return

	#
	# Eyed に RPC接続
	#
	client = BACnetRPCClient(host, port)
	click.echo(client.doReadPropertyRequest(
		int(device_id),
		int(object_id),
		int(instance_id),
		int(property_id)
	))
Esempio n. 2
0
def stop_bacnetd(ctx):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# EYED に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	click.echo(client.stop())
Esempio n. 3
0
def status_bacnetd(ctx):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# Eyed に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	click.echo(client.getStatus())
Esempio n. 4
0
def start_bacnetd(ctx, interface, device_id):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# EYED に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	click.echo(client.start(interface, device_id))
Esempio n. 5
0
def run_bacepics(ctx, device_id):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# Eyed に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	if client.getStatus() == False:
		click.echo('BACnetd is not running...')
		return

	#
	# Eyed に RPC接続
	#
	client = BACnetRPCClient(host, port)
	click.echo(client.getEpics(int(device_id)))
Esempio n. 6
0
def show_bacnet_scan(ctx):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# Eyed に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	if client.getStatus() == False:
		click.echo('BACnetd is not running...')
		return

	#
	# Eyed に RPC接続
	#
	client = BACnetRPCClient(host, port)
	click.echo(client.scan())
Esempio n. 7
0
def show_bacnet_devices(ctx):
	#
	# 引数の取得
	#
	host = ctx.obj['host']
	port = ctx.obj['port']

	#
	# Eyed に RPC接続
	#
	client = BACnetdRPCClient(host, port)
	if client.getStatus() == False:
		click.echo('BACnetd is not running...')
		return

	#
	# Eyed に RPC接続
	#
	client = BACnetRPCClient(host, port)
	for device in client.getDevices():
		click.echo(device)