You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.
I am trying to go through various parts of the calvin framework. Some actors require inputs at init. However, the documentation for those is a bit lacking. For example, I understand that std.Constant(data) requires data as input. But, what is 'data'? Can I specify a datafile?
Send predetermined data on output. Never ending sequence.
Outputs:
token : Some data
As a rule of convention, not enforced, a port named token as above consumes/produces "any kind" of data, where "any kind" means valid JSON data. So in this particular case, the following examples are both valid:
foo : std.Constant(data=null)
bar : std.Constant(data={"hey":"you", "array":[1,2,3,4]})
It is not possible to specify a file, but if you have complex data to pass in it is possible to use constant definitions:
define BAZ={"hey":"you", ... long and complex JSON structure ... }
baz : std.Constant(data=BAZ)
BTW, we'd love pull requests for documentation improvement :)
On Jul 20, 2017, at 6:46 AM, Per Persson ***@***.***> wrote:
Ah, yes, the documentation is a bit terse...
Send predetermined data on output. Never ending sequence.
Outputs:
token : Some data
As a rule of convention, not enforced, a port named token as above consumes/produces "any kind" of data, where "any kind" means valid JSON data.
Ok, this needs to be clarified.
So in this particular case, the following examples are both valid:
foo : std.Constant(data=null)
bar : std.Constant(data={"hey":"you", "array":[1,2,3,4]})
It is not possible to specify a file, but if you have complex data to pass in it is possible to use constant definitions:
define BAZ={"hey":"you", ... long and complex JSON structure ... }
baz : std.Constant(data=BAZ)
BTW, we'd love pull requests for documentation improvement :)
I am trying to go through various parts of the calvin framework. Some actors require inputs at init. However, the documentation for those is a bit lacking. For example, I understand that std.Constant(data) requires data as input. But, what is 'data'? Can I specify a datafile?
https://github.com/EricssonResearch/calvin-base/blob/master/calvin/actorstore/systemactors/std/Constant.py
"""
Send predetermined data on output. Never ending sequence.
Outputs:
token : Some data
"""
@manage(['data'])
def init(self, data):
self.data = data
The text was updated successfully, but these errors were encountered: