This file contains 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
local oneprpc = require 'oneprpc' | |
local json = require 'json' | |
local rpc = oneprpc:new({cik = "9829879a04efb8f4a1b42e22245739678fd4a94e"}) | |
local status, rid = rpc.create( | |
"dataport", | |
{ | |
format = "float", | |
name = "Temperature", |
This file contains 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 escript | |
%%! -K true -smp enable -pa ../ebin | |
main([BindTo,MessageSizeStr,MessageCountStr]) -> | |
{MessageSize, _} = string:to_integer(MessageSizeStr), | |
{MessageCount, _} = string:to_integer(MessageCountStr), | |
{ok, Context} = zmq:init(1), | |
{ok, Socket} = zmq:socket(Context, sub), | |
ok = zmq:setsockopt(Socket ,[{subscribe, ""}]), | |
ok = zmq:bind(Socket, BindTo), |