Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Actor Docs

Per Persson edited this page Aug 15, 2018 · 8 revisions

Module: Calvin

Documentation for actors included in the latest release.

Modules:

context : Access to information about the current context

data : Actors for data stream handling

exception : This module provides actors related to exception handling.

flow : This module provides actors related to handling of data flow.

io : This module organizes actors related to input and output.

json : This module provides container types List and Dict, accessors, and methods for reading and writing JSON formatted strings.

kappa : Helper actors for Calvin Kappa. Should only be used by trained professionals.

math : A collection of (simple) mathematical operations and functions

media : This module provides actors related to media objects/functions.

misc : This module organizes actors that cannot easily be categorized.

net : This module provides actors related to network access.

sensor : Actors related to sensors and other hardware

std : This module organizes actors related to standard operations and is expected to be available anywhere.

test : This module organizes actors related to testing of Calvin and is only expected to be available during test.

text : This module organizes actors related to text processing.

time : Actors related to timing.

web : This module provides actors related to web services.

[Top]


Module: context

Access to information about the current context

Actors:

PublicAttribute : Fetch given public attribute of runtime given as a section.subsection.subsubsection

RuntimeName : Get name of current runtime

RegistryAttribute : Fetch given registry attribute of runtime given as a section.subsection.subsubsection. Will only work for locally known attributes.

[Top]


Module: data

Actors for data stream handling

Actors:

Sink : Data sink - usually some form of permanent storage

Source : Data source.

PersistentBuffer : Buffer data to file (when necessary.)

[Top]


Module: exception

This module provides actors related to exception handling.

A common case of exception is end-of-stream (EOS) that indicates that the source cannot produce anymore tokens, e.g. when a file reader reaches the end of the file. Depending the application, this may or may not indicated that the process has completed execution, on possible scenario is that a file reader will start reading another file after reaching the end of a first file. It is up to the application developer to decide how to interpret EOS tokens.

Another common use of EOS tokens is to create lists and dictionaries with varying number of members, see docs for module 'json', in particular 'json.List' and 'json.Dict'.

Actors:

IsEOS : Return 'true' if token is EOS-token

ExceptionHandler : Scan tokens for Exceptions.

[Top]


Module: flow

This module provides actors related to handling of data flow.

Actors:

Alternate2 : Alternating between two streams of tokens

Collect : Collect tokens from many ports on the inport

CollectCompleteDict : Collect tokens from token port, forming a dict according to mapping. Will only produce

DispatchDict : Route tokens to the ports connected to the fan-out port token according to 'mapping'

Alternate : Fetch tokens from the fan-in port in the order given by the argument 'order'

Terminator : Acts like a true sink.

Dispatch : Dispatch tokens to all connected outports, aiming at keeping all queues equal, i.e. the token will end up in the smallest queue at all times.

Bool : Any token on the inport will be tested for truth value.

Void : Acts like a source but will never generate tokens.

CollectDict : Collect tokens from token port, forming a dict according to mapping. May produce

Join : Join two streams of tokens. Deprecated.

Switch : Switch data paths depending on 'switch'

Deselect : Route token from 'case_true' or 'case_false' to 'data' port depending on 'select'

Dealternate2 : Split token stream into two streams of tokens (odd and even tokens)

Select : Route 'data' token to 'case_true' or 'case_false' port depending on 'select'

Init : Insert an initial token (data) before passing all others through

Dealternate : Route tokens to the ports connected to the fan-out port token in the order given by the argument 'order'

[Top]


Module: io

This module organizes actors related to input and output.

Actors:

DigitalIn : Edge triggered digital input in runtime-defined pin.

PWM : Pulse width modulation on runtime-defined pin.

Light : Set state of a light (e.g. an LED or a lightbulb)

Log : Write data to calvin log using specified loglevel.

StandardIn : Reads from Standard IN, and send each read line as a token on output port

TiltSwitch : React to changes in a TiltSwitch.

Buzzer : Buzz

Switch : Creates a on/off switch.

Button : Handle a button and trigger on state changes.

Print : Print data to standard out of runtime. Note that what constitutes standard out varies.

DigitalOut : Set runtime defined-pin to inport state.

Knob : Read a knob to see which way it turned.

ServoMotor : Rotate servo given degrees.

LogError : Write data to system log at loglevel "Error"

FileReader : Read a file line by line, and send each line as a token on output port

LogInfo : Write data to system log at loglevel "INFO"

FileWriter : Writes input 'data' to file 'basename' + some counter + '.' + suffix

LogWarning : Write data to system log at loglevel "warning"

[Top]


Module: json

This module provides container types List and Dict, accessors, and methods for reading and writing JSON formatted strings.

Actors:

SetValues : Modify a container (list or dictionary)

List : Create a list.

SetDefaults : Modify a dictionary part of container if key does not exist (key must be string)

SetDefault : Modify a dictionary part of container if key does not exist (key must be string)

GetValues : Extract values from a container using list of keys/indices

ToString : Transform data to JSON-string

GetValue : Extract a value from a container using key/index

Dict : Create a dict

FromString : Transform JSON-formatted string to value

SetValue : Modify a container (list or dictionary)

Items : Produce all items from a list as a sequence of tokens.

[Top]


Module: kappa

Helper actors for Calvin Kappa. Should only be used by trained professionals.

Actors:

Sink : Sink for kappa results. Parameter buffer_size determines maximum number of items to hold

Source : Load up tokens for a kappa

[Top]


Module: math

A collection of (simple) mathematical operations and functions

Actors:

RandomInteger : Produce random integer in range [lower ... upper-1]

RandomNumber : Produce random number (floating point) in range [lower ... upper)

Evaluate : Evaluate arithmetic expression 'expr' with two arguments, passed as (a string) argument.

Compute : Perform a OP b where OP is the operator passed as (a string) argument.

[Top]


Module: media

This module provides actors related to media objects/functions.

Actors:

ImageSource : When token on input, get an image.

Bell : Triggers a audible or visible bell (runtime dependent).

FaceCounter : Counts faces in a base64 encoded jpg image

ObjectCounter : Counts objects in a base64 encoded jpg image

ObjectFinder : Finds and marks objects in a base64 encoded jpg image function

PlayAudio : Play audio file <audiofile>.

ImageSink : Incoming tokens, as base64 endoded images, sent to renderer.

FaceFinder : Finds and marks faces in a base64 encoded jpg image function

[Top]


Module: misc

This module organizes actors that cannot easily be categorized.

Actors:

ExplicitStateExample : Demonstrate (and test) explicit state handling in actors.

[Top]


Module: net

This module provides actors related to network access.

Actors:

HTTPPutS : HTTP method PUT

UDPListener : Listen for UDP messages on a given port.

HTTPGet : Get contents of URL

HTTPPost : Post data to URL

SimpleUDPSender : Send all incoming tokens to given address/port over UDP

HTTPGetS : HTTP method GET

UDPSender : Send all incoming tokens to given address/port over UDP

HTTPDeleteS : HTTP method DELETE

HTTPDelete : Send delete to URL

SimpleUDPListener : Listen for UDP messages on a given port. Address is of the form "ip:port" (note: ip is ipv4)

BasicAuthHeader : Generate Basic Authorization header from username/password

TCPServer : Etablish a TCP connection and forward all tokens except EOST on this connection.

MQTTSubscriber : Subscribe to given topics (list of mqtt ), output messages on message-port

MQTTPublisher : Publish all incoming messages to given broker"

HTTPPostS : HTTP method POST

HTTPPut : Post data to URL

TCPClient : Etablish a TCP connection and forward all tokens.

[Top]


Module: sensor

Actors related to sensors and other hardware

Actors:

TriggeredTemperature : Measure temperature.

LightBreaker : React to changes in a sensor.

TriggeredRelativeHumidity : Read Relative Humidity when told to.

Gyroscope : Measure the rotation. Takes the period of measurements, in microseconds, as input.

Temperature : Measure temperature. Takes the period of measurements, in seconds, as input.

Distance : Measure distance. Takes the period of measurements, in seconds, as input.

TriggeredPressure : Measure atmospheric pressure

RFIDReader : RFIDReader - read MIFare Classic/ultralight when present.

Accelerometer : Measure the acceleration. Takes the period of measurements, in microseconds, as input.

HallEffect : React to presence of magnetic field.

TriggeredSoilMoisture : Measure the moisture level in the soil.

TriggeredDistance : Measure distance.

[Top]


Module: std

This module organizes actors related to standard operations and is expected to be available anywhere.

Actors:

Iterate : Produce sequence of items by iterating over 'token',

Sequencer : Interleave incoming tokens with end of string token (EOS) on outport.

Watchdog : Data on inport is passed on to outport unchanged. If nothing has arrived on the inport after timeout seconds, then true is sent on the timeout port.

ClassicDelay : After first token, pass on token once every 'delay' seconds.

CountTimer : Produce a counter token on the output every period seconds

Stringify : Consume a token and stringify its value

RecTimer : After first token, pass on token once every 'delay' seconds. *Deprecated*

Burn : forward a token unchanged and Burns cycles

Constant : Send predetermined data on output. Never ending sequence.

Sum : Read a number and compute a cumulative sum

Identity : forward a token unchanged

Compare : Perform a REL b where REL is a comparison relation passed as (a string) argument.

SampleHold : Sample 'in' and hold it internally if 'sample' input is true, replacing any previous value.

Counter : Produce next integer in a sequence 1,2,3,...

DelayToken : Sends input on after a given delay has passed. Preserves time between tokens.

ConstSequencer : Consume a token and produce a constant from a sequence

Constantify : Consume a token and produce a constant

Trigger : Pass on given _data_ every _tick_ seconds

[Top]


Module: test

This module organizes actors related to testing of Calvin and is only expected to be available during test.

Actors:

FiniteCounter : Produce next token in a sequence start, start+1, ..., start+steps-1, EOSToken

RandomDelay : Sends input on after a random delay has passed.

Sink : Write tokens to standard output

ReplicaIdentity : forward a token with replica index prepended

TestProcess : This is only intended to be used for testing.

FakeShadow : forward a token unchanged like identity

[Top]


Module: text

This module organizes actors related to text processing.

Actors:

PrefixString : Prepends <prefix> to input tokens and passes them to ouput port as strings

LineJoin : Join strings into a text token using delimiter 'delim' (defaults to '\n')

Length : Return length of string

WordCount : Count occurances of words in a stream of words.

PostfixString : Appends <postfix> to input tokens and passes them to ouput port as strings

Format : Format output according to 'fmt' using dict

Split : Split string into list of strings on delimiter 'delim'. Consumes delimiter.

Mustache : Formats string based on template and incoming dictionary

RegexMatch : Apply the regex supplied as argument to the incoming text.

[Top]


Module: time

Actors related to timing.

Actors:

Timestamp : Return the (UTC) time in seconds since Jan 1st 1970

Datetime : Return a dictionary with current date and time.

[Top]


Module: web

This module provides actors related to web services.

Actors:

LocalWeather : Get current weather where runtime is located (or think it is located)

TriggeredWeather : Get current weather at selected destination, given as "city,country code", "city", or ",country code"

Twitter : Post incoming tokens (text) as twitter status

Pushbullet : Post incoming tokens (text) to runtime specific pushbullet channel with given title

LocationWeather : Get current weather at selected destination, given as "city,country code", "city", or ",country code"

[Top]


Actor: context.PublicAttribute(attribute)

Fetch given public attribute of runtime given as a section.subsection.subsubsection

Inports:

trigger : Any token will trigger a read

Outports:

value : The given attribute of this runtime, or null

Requires:

sys.attribute.public

[Top] [Module: context]


Actor: context.RuntimeName()

Get name of current runtime

Inports:

trigger : Any token will trigger a read

Outports:

value : A string denoting the name of this runtime, or null

Requires:

sys.attribute.indexed

[Top] [Module: context]


Actor: context.RegistryAttribute(attribute)

Fetch given registry attribute of runtime given as a section.subsection.subsubsection. Will only work for locally known attributes.

Inports:

trigger : Any token will trigger a read

Outports:

value : The given attribute of this runtime, or null

Requires:

sys.attribute.indexed

[Top] [Module: context]


Actor: data.Sink()

Data sink - usually some form of permanent storage

Inports:

data : a list of json structures to be saved

Requires:

data.sink

[Top] [Module: data]


Actor: data.Source(tags=null)

Data source. { "id": "ns=2;s=/Channel/Parameter/rpa[u1,115]", "tag": "R115", "type": "Double", "value": 0.0, "serverts": "2017-03-20 15:42:41.600000", "sourcets": "2017-03-20 15:42:41.542000", "calvints": 1490021096110, "status": 0 "info": "description given for parameter" }

Outports:

parameter : description of parameter as shown above

Requires:

data.source

[Top] [Module: data]


Actor: data.PersistentBuffer(buffer_id, chunk_size, interval)

Buffer data to file (when necessary.)

Inports:

item : data to be buffered

Outports:

current : list of data, current and on-line

buffered : catching up of buffered data, list

Requires:

buffer.persistent, json, sys.timer.once

[Top] [Module: data]


Actor: exception.IsEOS()

Return 'true' if token is EOS-token

Inports:

token : any token

Outports:

status : 'true' if input token is EOS-token, false otherwise

[Top] [Module: exception]


Actor: exception.ExceptionHandler(replacement=null, replace=false)

Scan tokens for Exceptions.

Any non-exception or EOS is simply passed on. Exceptions other than EOS are replaced with an EOS token on the ouput 'token' port unless optional 'replace' argument is true, in which case 'replacement' argument (defaults to null) is produced. Any exception (including EOS) are produces its reason on the 'status' output port.

Inports:

token : any token

Outports:

token : input token or EOS/replacement on exception

status : reason for any exception tokens encountered (including EOS)

[Top] [Module: exception]


Actor: flow.Alternate2()

Alternating between two streams of tokens

Inports:

token_1 : first token stream

token_2 : second token stream

Outports:

token : resulting token stream

[Top] [Module: flow]


Actor: flow.Collect()

Collect tokens from many ports on the inport

Inports:

token : collecting token stream Properties(routing:collect-unordered)

Outports:

token : resulting token stream

[Top] [Module: flow]


Actor: flow.CollectCompleteDict(mapping)

Collect tokens from token port, forming a dict according to mapping. Will only produce a complete dictionary.

Inports:

token : token Properties(routing:collect-all-tagged)

Outports:

dict : Collected dictionary according to 'mapping'

[Top] [Module: flow]


Actor: flow.DispatchDict(mapping)

Route tokens to the ports connected to the fan-out port token according to 'mapping'

For unrecognized mappings tokens are routed to 'default' port.

Inports:

dict : dictionary

Outports:

token : Dispatching tokens to connected ports according to 'mapping' Properties(routing:dispatch-mapped)

default : Default route for unknown token values

[Top] [Module: flow]


Actor: flow.Alternate(order)

Fetch tokens from the fan-in port in the order given by the argument 'order'

Inports:

token : incoming tokens from connected ports in order Properties(routing:collect-all-tagged)

Outports:

token : tokens collected from ports as given by order

[Top] [Module: flow]


Actor: flow.Terminator()

Acts like a true sink.

This behaviour is useful if an actor produces outputs that will never be used in a particular application. Because of how the runtime works, all output ports must be connected before the application can run, so leaving a port unconnected is not an option.

Inports:

void : A port that will consume tokens

[Top] [Module: flow]


Actor: flow.Dispatch()

Dispatch tokens to all connected outports, aiming at keeping all queues equal, i.e. the token will end up in the smallest queue at all times.

Inports:

token : incoming token stream

Outports:

token : outgoing token stream Properties(routing:round-robin)

[Top] [Module: flow]


Actor: flow.Bool()

Any token on the inport will be tested for truth value. The following values are considered false:

null false zero of any numeric type, for example, 0, 0L, 0.0, 0j any empty sequence, for example, "", (), [] any empty mapping, for example, {}

All other values are considered true

Inports:

token : a token to evaluate to either true or false

Outports:

bool : true or false

[Top] [Module: flow]


Actor: flow.Void()

Acts like a source but will never generate tokens.

This behaviour is useful if an actor has inputs that will never be used in a particular application. Because of how the runtime works, all input ports must be connected before the application can run, so leaving a port unconnected is not an option.

Outports:

void : A port that will never produce tokens

[Top] [Module: flow]


Actor: flow.CollectDict(mapping)

Collect tokens from token port, forming a dict according to mapping. May produce a partial dictionary.

Inports:

token : token Properties(routing:collect-any-tagged)

Outports:

dict : Collected dictionary according to 'mapping'

[Top] [Module: flow]


Actor: flow.Join()

Join two streams of tokens. Deprecated.

Note: This actor gives preference to token_1, hence if there is always a token available on that port, then token_2 will starve. The actor you are looking for is probably flow.Collect or possibly flow.Alternate2

Inports:

token_1 : first token stream

token_2 : second token stream

Outports:

token : resulting token stream

[Top] [Module: flow]


Actor: flow.Switch()

Switch data paths depending on 'switch'

Switch assumes 'false' or 'true' as input to 'switch', other values are considered 'false'.

Inports:

switch : Switch data paths a->b, b->a if 'true, else a->a, b->b

a : token

b : token

Outports:

a : token

b : token

[Top] [Module: flow]


Actor: flow.Deselect()

Route token from 'case_true' or 'case_false' to 'data' port depending on 'select'

Deselect assumes 'false' or 'true' as input, values outside that range will default to 'case_false'.

Inports:

case_false : Token to output 'data' if select token is 'false'

case_true : Token to output 'data' if select token is 'true'

select : Select which inport will propagate to 'data' port

Outports:

data : Token from 'case_true' or 'case_false' port

[Top] [Module: flow]


Actor: flow.Dealternate2()

Split token stream into two streams of tokens (odd and even tokens)

Inports:

token : incoming token stream

Outports:

token_1 : first token stream

token_2 : second token stream

[Top] [Module: flow]


Actor: flow.Select()

Route 'data' token to 'case_true' or 'case_false' port depending on 'select'

Select assumes false or true as input, values outside that range will default to 'case_false'.

Inports:

select : Select output for token on 'data' port

data : Token to send to 'case_true' or 'case_false' port

Outports:

case_false : Token from input 'data' if select token is false

case_true : Token from input 'data' if select token is true

[Top] [Module: flow]


Actor: flow.Init(data)

Insert an initial token (data) before passing all others through

Inports:

in : Any token

Outports:

out : Data given as parameter followed by data from in port

Requires:

sys.schedule

[Top] [Module: flow]


Actor: flow.Dealternate(order)

Route tokens to the ports connected to the fan-out port token in the order given by the argument 'order'

Inports:

token : Any token

Outports:

token : Dispatching tokens to connected ports in order Properties(routing:dispatch-ordered)

[Top] [Module: flow]


Actor: io.DigitalIn()

Edge triggered digital input in runtime-defined pin.

Outports:

state : 1/0 when edge goes high/low

Requires:

io.digitalin

[Top] [Module: io]


Actor: io.PWM()

Pulse width modulation on runtime-defined pin.

Inports:

dutycycle : new dutycycle

Requires:

io.pwm

[Top] [Module: io]


Actor: io.Light()

Set state of a light (e.g. an LED or a lightbulb)

Inports:

on : true if light should be on, false if turned off

Requires:

io.light

[Top] [Module: io]


Actor: io.Log(loglevel)

Write data to calvin log using specified loglevel. Supported loglevels: INFO, WARNING, ERROR

Inports:

data : data to be logger

[Top] [Module: io]


Actor: io.StandardIn()

Reads from Standard IN, and send each read line as a token on output port

Outports:

out : Each token is a line of text, or EOSToken.

Requires:

io.stdin

[Top] [Module: io]


Actor: io.TiltSwitch()

React to changes in a TiltSwitch.

Outports:

open : state true=closed, false=open

Requires:

io.tiltswitch

[Top] [Module: io]


Actor: io.Buzzer()

Buzz

Inports:

on : true/false for on/off

Requires:

io.buzzer

[Top] [Module: io]


Actor: io.Switch()

Creates a on/off switch.

Outports:

state : 0/1 according to switch state

Requires:

io.switch

[Top] [Module: io]


Actor: io.Button(text="Button")

Handle a button and trigger on state changes.

Outports:

state : Button state 1=pressed, 0=not pressed

Requires:

io.button

[Top] [Module: io]


Actor: io.Print()

Print data to standard out of runtime. Note that what constitutes standard out varies.

Inports:

token : data to write

Requires:

io.stdout

[Top] [Module: io]


Actor: io.DigitalOut()

Set runtime defined-pin to inport state.

Inports:

state : 1/0

Requires:

io.digitalout

[Top] [Module: io]


Actor: io.Knob()

Read a knob to see which way it turned.

Outports:

direction : clockwise or anti-clockwise

Requires:

io.knob

[Top] [Module: io]


Actor: io.ServoMotor()

Rotate servo given degrees.

Inports:

angle : set servo to given angle

Requires:

io.servomotor

[Top] [Module: io]


Actor: io.LogError()

Write data to system log at loglevel "Error"

Inports:

data : data to be logged

Requires:

log.error

[Top] [Module: io]


Actor: io.FileReader()

Read a file line by line, and send each line as a token on output port

Inports:

filename : File to read. If file doesn't exist, an ExceptionToken is produced

Outports:

out : Each token is a line of text, or EOSToken.

Requires:

io.filereader, io.filesize

[Top] [Module: io]


Actor: io.LogInfo()

Write data to system log at loglevel "INFO"

Inports:

data : data to be logged

Requires:

log.info

[Top] [Module: io]


Actor: io.FileWriter(basename, suffix="")

Writes input 'data' to file 'basename' + some counter + '.' + suffix End of stream token changes file

Inports:

data : data

Requires:

io.filewriter

[Top] [Module: io]


Actor: io.LogWarning()

Write data to system log at loglevel "warning"

Inports:

data : data to be logged

Requires:

log.warning

[Top] [Module: io]


Actor: json.SetValues()

Modify a container (list or dictionary)

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range. N.B. This actor will incur a performance penalty from a deep copy operation. Use wisely.

Inports:

container : a list or dictionary

keys : A list of indices (integer), keys (string), or a (possibly mixed) list for nested containers

values : A list of values to set for the corresponding keys

Outports:

container : a modified container

[Top] [Module: json]


Actor: json.List(pre_list=null, post_list=null, n=1)

Create a list.

Consumes 'n' tokens to produce a list, 'n' defaults to 1. If 'n' is zero or negative, consumes tokens until EOS encountered (variable list length). The optional arguments pre_list and post_list are used to prepend and extend the list before delivering the final list. Will produce an ExceptionToken if EOS is encountered when n > 0, or if an ExceptionToken is encountered regardless of value of 'n'.

Inports:

item : items to append to list

Outports:

list : a list of consumed items

[Top] [Module: json]


Actor: json.SetDefaults()

Modify a dictionary part of container if key does not exist (key must be string)

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range. N.B. This actor will incur a performance penalty from a deep copy operation. Use wisely.

Inports:

container : a list or dictionary

keys : A list of keys (string), or a (possibly mixed) list for nested containers (must point to dictionary key)

values : A list of default values to set

Outports:

container : a modified container

[Top] [Module: json]


Actor: json.SetDefault()

Modify a dictionary part of container if key does not exist (key must be string)

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range. N.B. This actor will incur a performance penalty from a deep copy operation. Use wisely.

Inports:

container : a list or dictionary

key : key (string), or a (possibly mixed) list for nested containers

value : default value to set

Outports:

container : a modified container

[Top] [Module: json]


Actor: json.GetValues()

Extract values from a container using list of keys/indices

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range, or key is not present in dictionary.

Inports:

container : a dictionary, list or a nested mix of them

keys : A list of items to access using index (integer), key (string), or a (possibly mixed) list for nested containers

Outports:

values : A list of values for the specifiers in keys

[Top] [Module: json]


Actor: json.ToString(exception_output=null)

Transform data to JSON-string

Exception tokens will produce "null" as output unless another value is supplied through the optional 'exception_output' argument.

Inports:

data : any kind of token

Outports:

string : JSON-formatted string

Requires:

json

[Top] [Module: json]


Actor: json.GetValue()

Extract a value from a container using key/index

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range, or key is not present in dictionary.

Inports:

container : a dictionary, list or a nested mix of them

key : index (integer), key (string), or a (possibly mixed) list for nested containers

Outports:

value : value for the key/index/list

[Top] [Module: json]


Actor: json.Dict(n=1)

Create a dict

Consume 'n' key/value pairs to produce a dictionary, 'n' defaults to 1. If 'n' is zero or negative, consume key/value pairs until EOS encountered on both input ports. If EOS is only encountered on one port, produce an execption.

Inports:

key : key must be string

value : can be any token

Outports:

dict : dictionary or Exception

[Top] [Module: json]


Actor: json.FromString(exception_output=null)

Transform JSON-formatted string to value

Invalid input will produce an Exception token as output unless another value is supplied through the optional 'exception_output' argument. N.B. Using 'null' for 'exception_output' will produce an ExceptionToken rather than 'null'.

Inports:

string : JSON-formatted string

Outports:

data : data read from input string

Requires:

json

[Top] [Module: json]


Actor: json.SetValue()

Modify a container (list or dictionary)

If container is a list then the key must be an integer index (zero-based), or a list of indices if for nested lists. If container is a dictionary the key must be a string or list of (string) keys for nested dictionaries. It is OK to make a key list of mixed strings and integers if the container comprises nested dictionaries and lists. Produce an ExceptionToken if mapping between key and (sub-)container is incorrect, or if a integer index is out of range. N.B. This actor will incur a performance penalty from a deep copy operation. Use wisely.

Inports:

container : a list or dictionary

key : index (integer), key (string), or a (possibly mixed) list for nested containers

value : value to set

Outports:

container : a modified container

[Top] [Module: json]


Actor: json.Items()

Produce all items from a list as a sequence of tokens.

Produce an exception token if data is not a list.

Inports:

list : a list

Outports:

item : items of list in order

Requires:

copy

[Top] [Module: json]


Actor: kappa.Sink(buffer_size=5)

Sink for kappa results. Parameter buffer_size determines maximum number of items to hold

Inports:

in : Any token

Requires:

kappa

[Top] [Module: kappa]


Actor: kappa.Source()

Load up tokens for a kappa

Outports:

out : Any token

Requires:

kappa

[Top] [Module: kappa]


Actor: math.RandomInteger(lower, upper)

Produce random integer in range [lower ... upper-1]

Inports:

trigger : Any token

Outports:

integer : Random integer in range [lower ... upper-1]

Requires:

math.random

[Top] [Module: math]


Actor: math.RandomNumber(lower, upper)

Produce random number (floating point) in range [lower ... upper)

Inports:

trigger : Any token

Outports:

number : Random number in range [lower ... upper)

Requires:

math.random

[Top] [Module: math]


Actor: math.Evaluate(expr)

Evaluate arithmetic expression 'expr' with two arguments, passed as (a string) argument.

Inports:

x : a number

y : a number

Outports:

result : value expr with x and y substituted for given values

Requires:

math.arithmetic.eval

[Top] [Module: math]


Actor: math.Compute(op)

Perform a OP b where OP is the operator passed as (a string) argument.

Allowed values for OP are: +, -, *, /, div (integer division), mod (modulo)

Inports:

a : a token

b : a token

Outports:

result : result of 'a' OP 'b'

Requires:

math.arithmetic.operator

[Top] [Module: math]


Actor: media.ImageSource()

When token on input, get an image.

Inports:

trigger : anything

Outports:

b64image : generated image

Requires:

image.source

[Top] [Module: media]


Actor: media.Bell()

Triggers a audible or visible bell (runtime dependent).

Inports:

trigger : any token triggers the bell.

Requires:

notify.bell

[Top] [Module: media]


Actor: media.FaceCounter()

Counts faces in a base64 encoded jpg image

Inports:

b64image : Image to analyze

Outports:

objects : number of faces found in image

Requires:

image.facedetection

[Top] [Module: media]


Actor: media.ObjectCounter()

Counts objects in a base64 encoded jpg image

Inports:

b64image : Image to analyze

Outports:

objects : number of objects found in image

Requires:

image.objectdetection

[Top] [Module: media]


Actor: media.ObjectFinder()

Finds and marks objects in a base64 encoded jpg image function

Inports:

b64image : Image to analyze

Outports:

b64image : New image with all detected objects marked

Requires:

image.objectfinding

[Top] [Module: media]


Actor: media.PlayAudio(audiofile)

Play audio file <audiofile>.

Inports:

play : starts playing file when true

Requires:

media.audio

[Top] [Module: media]


Actor: media.ImageSink()

Incoming tokens, as base64 endoded images, sent to renderer.

Inports:

b64image : base64 encoded jpg

Requires:

image.render

[Top] [Module: media]


Actor: media.FaceFinder()

Finds and marks faces in a base64 encoded jpg image function

Inports:

b64image : Image to analyze

Outports:

b64image : New image with all detected faces marked

Requires:

image.facefinding

[Top] [Module: media]


Actor: misc.ExplicitStateExample()

Demonstrate (and test) explicit state handling in actors. In order to migrate this actor, potentially to non-python platforms, we need to explicitly handle set/get state for the custom wrap object.

Inports:

token : any token

Outports:

token : a string with input token wrapped in '(((' and ')))'

[Top] [Module: misc]


Actor: net.HTTPPutS(url, headers, params, auth)

HTTP method PUT url : url to send to params : dictionary with query parameters (or null) headers: dictionary with headers to include in request (or null) auth : dictionary with authtype (basic/digest), username and password (or null)

Inports:

data : execute request, include data as body if not null or boolean

Outports:

status : status of request

headers : JSON dictionary of incoming headers

data : body of response (if any)

Requires:

http.put

[Top] [Module: net]


Actor: net.UDPListener()

Listen for UDP messages on a given port.

Control port takes control commands of the form (uri only applicable for connect.)

{
    "command" : "listen"/"stop",
    "uri": "udp://<ipv4 address>:<port>"
}

Inports:

control_in : JSON containing host & port to listen to.

Outports:

data_out : Data received on the UDP port will be sent as tokens.

Requires:

network.udplistener, regexp

[Top] [Module: net]


Actor: net.HTTPGet()

Get contents of URL

Inports:

URL : URL to get

params : dictionary with query parameters (optional)

headers : dictionary with headers to include in request (optional)

auth : dictionary with authtype (basic/digest), username and password (optional)

Outports:

status : HTTP status of request

headers : dictionary of response headers

data : body of response (only if body is non-empty)

Requires:

http.get

[Top] [Module: net]


Actor: net.HTTPPost()

Post data to URL

Inports:

URL : URL to post to

data : Data to post

params : dictionary with query parameters (optional)

headers : dictionary with headers to include in request (optional)

auth : dictionary with authtype (basic/digest), username and password (optional)

Outports:

status : HTTP status of request

headers : dictionary of response headers

data : body of response (only if body is non-empty)

Requires:

http.post

[Top] [Module: net]


Actor: net.SimpleUDPSender(address, port)

Send all incoming tokens to given address/port over UDP

Inports:

data : Each received token will be sent to address set via control port

Requires:

network.socketclient

[Top] [Module: net]


Actor: net.HTTPGetS(url, headers, params, auth)

HTTP method GET url : url to send to params : dictionary with query parameters (or null) headers: dictionary with headers to include in request (or null) auth : dictionary with authtype (basic/digest), username and password (or null)

Inports:

data : execute request, include data as body if not null or boolean

Outports:

status : status of request

headers : JSON dictionary of incoming headers

data : body of response (if any)

Requires:

http.get

[Top] [Module: net]


Actor: net.UDPSender()

Send all incoming tokens to given address/port over UDP

Control port takes control commands of the form (uri only applicable for connect.)

{
    "command" : "connect"/"disconnect",
    "uri": "udp://<address>:<port>"
}

Inports:

data_in : Each received token will be sent to address set via control port

control_in : Control port

Requires:

network.socketclient, regexp

[Top] [Module: net]


Actor: net.HTTPDeleteS(url, headers, params, auth)

HTTP method DELETE

url : url to send to params : dictionary with query parameters (or null) headers: dictionary with headers to include in request (or null) auth : dictionary with authtype (basic/digest), username and password (or null)

Inports:

data : execute request, include data as body if not null or boolean

Outports:

status : status of request

headers : JSON dictionary of incoming headers

data : body of response (if any)

Requires:

http.delete

[Top] [Module: net]


Actor: net.HTTPDelete()

Send delete to URL

Inports:

URL : URL to send delete to

params : dictionary with query parameters (optional)

headers : dictionary with headers to include in request (optional)

auth : dictionary with authtype (basic/digest), username and password (optional)

Outports:

status : HTTP status of request

headers : dictionary of response headers

data : body of response (only if body is non-empty)

Requires:

http.delete

[Top] [Module: net]


Actor: net.SimpleUDPListener(address)

Listen for UDP messages on a given port. Address is of the form "ip:port" (note: ip is ipv4)

Outports:

data : data in packets received on the UDP port will forwarded as tokens.

Requires:

network.udplistener

[Top] [Module: net]


Actor: net.BasicAuthHeader()

Generate Basic Authorization header from username/password

Inports:

credential : JSon with values for "username" and "password"

Outports:

header : Authorization header

Requires:

base64

[Top] [Module: net]


Actor: net.TCPServer(delimiter="\r\n", max_length=8192, mode="line")

Etablish a TCP connection and forward all tokens except EOST on this connection. Any recevied data on the TCP connection is forwarded according to either Line mode or Raw mode.

Inports:

host : The host name as a string

port : The port number

handle : A handle to the connection for which the data is meant.

token : Each received token will be sent to the client matching the handle.

Outports:

handle : A handle to the connection from which the data was received.

token : Data received on the TCP connection will be sent as tokens.

Requires:

network.tcpserver

[Top] [Module: net]


Actor: net.MQTTSubscriber(hostname, port, topics, settings)

Subscribe to given topics (list of mqtt ), output messages on message-port

Arguments: hostname: <ip/name of mqtt broker>, port: <port to use on mqtt broker>, topics: <list of topics to subscribe to>

settings is a dictionary with optional arguments : { "tls": { "ca_certs": , "certfile": , "keyfile": , "tls_version": , "ciphers": }, "auth": { "username": <username "password": }, "will": { "topic": , "payload": }, "transport": , "client_id": }

Outports:

message : dictionary {"topic": <topic>, "payload": <payload>}

Requires:

mqtt.subscribe

[Top] [Module: net]


Actor: net.MQTTPublisher(hostname, port, settings)

Publish all incoming messages to given broker"

Arguments: hostname: <ip/name of of mqtt broker>, port: <port to use on mqtt broker>,

Settings is a dictionary with optional arguments.

{
  "tls": {
      "ca_certs": <ca certs>, "certfile": <certfile>, "keyfile": <keyfile>,
      "tls_version": <tls version>, "ciphers": <ciphers>
  },
  "auth": { "username": <username "password": <password> },
  "will": { "topic": <topic>, "payload": <payload> },
  "transport": <tcp or websocket>,
  "client_id": <id of this mqtt client>
  "topic": <prefix all outgoing message topics with this>
}

Inports:

topic : topic of message

payload : payload of message

Requires:

mqtt.publish

[Top] [Module: net]


Actor: net.HTTPPostS(url, headers, params, auth)

HTTP method POST url : url to send to params : dictionary with query parameters (or null) headers: dictionary with headers to include in request (or null) auth : dictionary with authtype (basic/digest), username and password (or null)

Inports:

data : execute request, include data as body if not null or boolean

Outports:

status : status of request

headers : JSON dictionary of incoming headers

data : body of response (if any)

Requires:

http.post

[Top] [Module: net]


Actor: net.HTTPPut()

Post data to URL

Inports:

URL : URL to put to

data : Data to put

params : dictionary with query parameters (optional)

headers : dictionary with headers to include in request (optional)

auth : dictionary with authtype (basic/digest), username and password (optional)

Outports:

status : HTTP status of request

headers : dictionary of response headers

data : body of response (only if body is non-empty)

Requires:

http.put

[Top] [Module: net]


Actor: net.TCPClient(delimiter="\r\n", mode="delimiter")

Etablish a TCP connection and forward all tokens. Any recevied data on the TCP connection is forwarded according to protocol.

Inports:

data_in : Each received token will be sent out through the TCP connection.

control_in : Each received token will be sent out through the TCP connection.

Outports:

data_out : Data received on the TCP connection will be sent as tokens.

Requires:

network.socketclient, regexp

[Top] [Module: net]


Actor: sensor.TriggeredTemperature()

Measure temperature.

Inports:

trigger : any token triggers meausurement

Outports:

centigrade : temperature, in centigrade

Requires:

io.temperature

[Top] [Module: sensor]


Actor: sensor.LightBreaker()

React to changes in a sensor.

Outports:

open : state true=closed, false=open

Requires:

io.lightbreaker

[Top] [Module: sensor]


Actor: sensor.TriggeredRelativeHumidity()

Read Relative Humidity when told to.

Inports:

measure : Triggers a temperature reading

Outports:

percent : The measured humidity in percent

Requires:

io.humidity

[Top] [Module: sensor]


Actor: sensor.Gyroscope(period)

Measure the rotation. Takes the period of measurements, in microseconds, as input.

Outports:

rotation : Rotation around the x,y and z axis. Is returned as a dict with the x,y, and z keys.

Requires:

io.gyroscope

[Top] [Module: sensor]


Actor: sensor.Temperature(period)

Measure temperature. Takes the period of measurements, in seconds, as input.

Outports:

centigrade : temperature, in centigrade

Requires:

io.temperature, sys.timer.once

[Top] [Module: sensor]


Actor: sensor.Distance(period)

Measure distance. Takes the period of measurements, in seconds, as input.

Outports:

meters : distance, in meters

Requires:

io.distance, sys.timer.repeating

[Top] [Module: sensor]


Actor: sensor.TriggeredPressure()

Measure atmospheric pressure

Inports:

trigger : any token triggers measurement

Outports:

mbar : atmospheric pressure, in millibars

Requires:

io.pressure

[Top] [Module: sensor]


Actor: sensor.RFIDReader()

RFIDReader - read MIFare Classic/ultralight when present.

Outports:

data : {"cardno": uid, "data": <data>, "timestamp": <timestamp>}

Requires:

io.rfid, time

[Top] [Module: sensor]


Actor: sensor.Accelerometer(period)

Measure the acceleration. Takes the period of measurements, in microseconds, as input.

Outports:

acceleration : Acceleration as a dict with the x,y, and z directions.

Requires:

io.accelerometer

[Top] [Module: sensor]


Actor: sensor.HallEffect()

React to presence of magnetic field.

Outports:

state : true if magnetic field present, false otherwise

Requires:

io.hallswitch

[Top] [Module: sensor]


Actor: sensor.TriggeredSoilMoisture()

Measure the moisture level in the soil.

Inports:

trigger : any token triggers meausurement

Outports:

level : moisture level, in percent

Requires:

io.soilmoisture

[Top] [Module: sensor]


Actor: sensor.TriggeredDistance()

Measure distance.

Inports:

trigger : any token triggers meausurement

Outports:

meters : distance, in meters

Requires:

io.distance

[Top] [Module: sensor]


Actor: std.Iterate()

Produce sequence of items by iterating over 'token', or simply pass 'token' along if not iterable (i.e. list, dict, or string)

N.B. Empty iterables produces a 'null' token.

FIXME: Is 'null' production the right thing? Exception? Nothing?

Inports:

token : any token

Outports:

item : item (or value if input is dictionary)

index : index of item (or key if input is dictionary)

Requires:

copy

[Top] [Module: std]


Actor: std.Sequencer()

Interleave incoming tokens with end of string token (EOS) on outport.

Inports:

data_in : Tokens, any kind.

Outports:

data_out : Tokens seen on input, interleaved with EOS

[Top] [Module: std]


Actor: std.Watchdog(timeout, immediate)

Data on inport is passed on to outport unchanged. If nothing has arrived on the inport after timeout seconds, then true is sent on the timeout port. If parameter immediate is false, then the timer will not start until at least one token has arrived, otherwise it will start upon instantiation.

Inports:

data : anything

Outports:

data : whatever arrived on the inport of the same name

timeout : true iff timeout seconds has passed without tokens on inport

Requires:

sys.timer.once

[Top] [Module: std]


Actor: std.ClassicDelay(delay)

After first token, pass on token once every 'delay' seconds.

Inports:

token : anything

Outports:

token : anything

Requires:

sys.timer.repeating

[Top] [Module: std]


Actor: std.CountTimer(start=1, sleep=0.1, steps=9223372036854775807)

Produce a counter token on the output every period seconds and for steps times, using a timer.

Outports:

integer : Integer counter

Requires:

sys.timer.once, sys.timer.repeating

[Top] [Module: std]


Actor: std.Stringify(encoding=null)

Consume a token and stringify its value

Inports:

in :

Outports:

out :

[Top] [Module: std]


Actor: std.RecTimer(delay)

After first token, pass on token once every 'delay' seconds. *Deprecated*

This actor is identical to ClassicDelay.

Inports:

token : anything

Outports:

token : anything

Requires:

sys.timer.repeating

[Top] [Module: std]


Actor: std.Burn(duration=0.1, dump=false)

forward a token unchanged and Burns cycles

Inports:

token : a token

Outports:

token : the same token

[Top] [Module: std]


Actor: std.Constant(data)

Send predetermined data on output. Never ending sequence.

Outports:

token : given data

Requires:

sys.schedule

[Top] [Module: std]


Actor: std.Sum()

Read a number and compute a cumulative sum

Inports:

integer : Number

Outports:

integer : Cumulative sum

[Top] [Module: std]


Actor: std.Identity(dump=false)

forward a token unchanged

Inports:

token : a token

Outports:

token : the same token

[Top] [Module: std]


Actor: std.Compare(rel)

Perform a REL b where REL is a comparison relation passed as (a string) argument.

Allowed values for REL are: =, <, >, <=, >=, !=

Inports:

a : a token

b : a token

Outports:

result : true or false according to result of 'a' REL 'b'

Requires:

math.arithmetic.eval

[Top] [Module: std]


Actor: std.SampleHold(default=null)

Sample 'in' and hold it internally if 'sample' input is true, replacing any previous value.

Produce the held token on the 'out' port regardless of wether 'sample' is true or false. Assumes 'false' or 'true' as input to 'sample', other values are considered 'false'.

Inports:

sample : Sample 'in' if true.

in : A token

Outports:

out : The currently held token, or the 'default' argument if not sampled yet.

Requires:

copy

[Top] [Module: std]


Actor: std.Counter()

Produce next integer in a sequence 1,2,3,...

Outports:

integer : Integer

Requires:

sys.schedule

[Top] [Module: std]


Actor: std.DelayToken(delay)

Sends input on after a given delay has passed. Preserves time between tokens.

Inports:

token : anything

Outports:

token : anything

Requires:

sys.timer.once

[Top] [Module: std]


Actor: std.ConstSequencer(sequence)

Consume a token and produce a constant from a sequence

Inports:

in :

Outports:

out :

[Top] [Module: std]


Actor: std.Constantify(constant)

Consume a token and produce a constant

Inports:

in :

Outports:

out :

[Top] [Module: std]


Actor: std.Trigger(tick, data)

Pass on given _data_ every _tick_ seconds

Outports:

data : given data

Requires:

sys.timer.repeating

[Top] [Module: std]


Actor: test.FiniteCounter(start=0, replicate_mult=false, repeat=false, steps=9223372036854775807, stopped=false)

Produce next token in a sequence start, start+1, ..., start+steps-1, EOSToken If repeat is True will repeat sequence

Outports:

integer : Integer

[Top] [Module: test]


Actor: test.RandomDelay()

Sends input on after a random delay has passed.

Inports:

token : anything

Outports:

token : anything

Requires:

math.random, sys.timer.once

[Top] [Module: test]


Actor: test.Sink(store_tokens=false, active=true, quiet=false)

Write tokens to standard output

Inports:

token : Any token

[Top] [Module: test]


Actor: test.ReplicaIdentity(dump=false)

forward a token with replica index prepended

Inports:

token : a token

Outports:

token : the prepended token

[Top] [Module: test]


Actor: test.TestProcess(eval_str, replicate_str=null, dump=false, kwargs=null)

This is only intended to be used for testing. Perform processing on input token and send out.

Inports:

data : a token

Outports:

result : result of processing

[Top] [Module: test]


Actor: test.FakeShadow(dump=false)

forward a token unchanged like identity Starts as shadow and can be later changed to not be a shadow by having a fakeshadow requires (but needs to be migrated to reeval)

Inports:

token : a token

Outports:

token : the same token

Requires:

mock.shadow

[Top] [Module: test]


Actor: text.PrefixString(prefix="-")

Prepends <prefix> to input tokens and passes them to ouput port as strings

Inports:

in : Text token

Outports:

out : Prefixed text token

[Top] [Module: text]


Actor: text.LineJoin(delim="\n")

Join strings into a text token using delimiter 'delim' (defaults to '\n')

Consume consecutive strings until an end-of-stream (EOSToken) is received, which triggers an output of the joined lines. After receiving the EOFToken, the LineJoin is reset and ready for new lines to join.

Inports:

line : arbitrary string

Outports:

text : strings joined by

[Top] [Module: text]


Actor: text.Length()

Return length of string

Inports:

string : arbitrary string

Outports:

length :

[Top] [Module: text]


Actor: text.WordCount()

Count occurances of words in a stream of words.

Inports:

in : a word

Outports:

out : count for each word

[Top] [Module: text]


Actor: text.PostfixString(postfix="-")

Appends <postfix> to input tokens and passes them to ouput port as strings

Inports:

in : Text token

Outports:

out : Postfixed text token

[Top] [Module: text]


Actor: text.Format(fmt)

Format output according to 'fmt' using dict

Format string uses "{access.key.path}" to access dict

Inports:

dict :

Outports:

text : Formatted string

Requires:

regexp

[Top] [Module: text]


Actor: text.Split(delim)

Split string into list of strings on delimiter 'delim'. Consumes delimiter.

Inports:

text : arbitrary string

Outports:

lines : list of strings

[Top] [Module: text]


Actor: text.Mustache(fmt)

Formats string based on template and incoming dictionary

Format string uses "{{access.key.path}}" to access dict Also refer to Mustache documentation (http://mustache\.github\.io/\)

Inports:

dict :

Outports:

text : formatted string

Requires:

mustache

[Top] [Module: text]


Actor: text.RegexMatch(regex)

Apply the regex supplied as argument to the incoming text.

If the regex matches, the text is routed to the 'match' output, otherwise it is routed to the 'no_match' output. If a (single) capture group is present, the captured result will be routed to 'match' instead of the full match, but it the match fails, the full input text will be routed to 'no_match' just as if no capture group was present. Any additional capture groups will be ignored.

Inports:

text : text to match

Outports:

match : matching text or capture if capture group present

no_match : input text if match fails

Requires:

regexp

[Top] [Module: text]


Actor: time.Timestamp()

Return the (UTC) time in seconds since Jan 1st 1970

Detailed information

Inports:

trigger : any token

Outports:

timestamp : floating point number

Requires:

time

[Top] [Module: time]


Actor: time.Datetime()

Return a dictionary with current date and time.

The dictionary contains entries for: century, year, month, day, hour, minute, second, timezone

Inports:

trigger : any token

Outports:

datetime : dictionary

Requires:

time

[Top] [Module: time]


Actor: web.LocalWeather()

Get current weather where runtime is located (or think it is located)

Inports:

trigger : start fetching weather on any token

Outports:

forecast : weather at preconfigured city, or null on error

Requires:

weather.local

[Top] [Module: web]


Actor: web.TriggeredWeather(city)

Get current weather at selected destination, given as "city,country code", "city", or ",country code"

Inports:

trigger : start fetching weather on any token

Outports:

forecast : weather at given city, or null on error

Requires:

weather

[Top] [Module: web]


Actor: web.Twitter()

Post incoming tokens (text) as twitter status

Inports:

status : A text (with a maximum length)

Requires:

web.twitter.post

[Top] [Module: web]


Actor: web.Pushbullet(title)

Post incoming tokens (text) to runtime specific pushbullet channel with given title

Inports:

message : A message

Requires:

web.pushbullet.channel.post

[Top] [Module: web]


Actor: web.LocationWeather()

Get current weather at selected destination, given as "city,country code", "city", or ",country code"

Inports:

location : location to fetch weather from

Outports:

forecast : weather at given city, or null on error

Requires:

weather

[Top] [Module: web]


Clone this wiki locally