Model InterfaceΒΆ

Language

Import

Input

Output

Server

Client

Timesync

Send

Recv

Call

R

library(yggdrasil)

YggInterface('YggInput', '{channel_name}')

YggInterface('YggOutput', '{channel_name}')

YggInterface('YggRpcServer', '{channel_name}')

YggInterface('YggRpcClient', '{channel_name}')

YggInterface('YggTimesync', '{channel_name}')

flag = {channel_obj}$send({outputs})

c(flag, {inputs}) %<-% {channel_obj}$recv()

c(flag, {inputs}) %<-% {channel_obj}$call({outputs})

c

#include "YggInterface.h"

yggInputType("{channel_name}", {datatype})

yggOutputType("{channel_name}", {datatype})

yggRpcServerType("{channel_name}", {datatype_in}, {datatype_out})

yggRpcClientType("{channel_name}", {datatype_out}, {datatype_in})

yggTimesync("{channel_name}", "{time_units}")

flag = yggSend({channel_obj}, {outputs})

flag = yggRecv({channel_obj}, {input_refs})

flag = rpcCall({channel_obj}, {outputs}, {inputs})

c++

#include "YggInterface.hpp"

YggInput {channel_obj}("{channel_name}")

YggOutput {channel_obj}("{channel_name}")

YggRpcServer {channel_obj}("{channel_name}", {datatype_in}, {datatype_out})

YggRpcClient {channel_obj}("{channel_name}", {datatype_out}, {datatype_in})

YggTimesync {channel_obj}("{channel_name}", "{time_units}")

flag = {channel_obj}.send({nargs}, {outputs})

flag = {channel_obj}.recv({nargs}, {input_refs})

flag = {channel_obj}.call({nargs}, {outputs}, {input_refs})

fortran

use fygg

ygg_input_type("{channel_name}", {datatype})

ygg_output_type("{channel_name}", {datatype})

ygg_rpc_server_type("{channel_name}", {datatype_in}, {datatype_out})

ygg_rpc_client_type("{channel_name}", {datatype_out}, {datatype_in})

yggTimesync("{channel_name}", "{time_units}")

flag = ygg_send_var({channel_obj}, [yggarg({outputs})])

flag = ygg_recv_var({channel_obj}, [yggarg({inputs})])

flag = ygg_rpc_call({channel_obj}, [yggarg({outputs})], [yggarg({inputs})])

julia

import Yggdrasil: commtype

Yggdrasil.YggInterface("YggInput", "{channel_name}")

Yggdrasil.YggInterface("YggOutput", "{channel_name}")

Yggdrasil.YggInterface("YggRpcServer", "{channel_name}")

Yggdrasil.YggInterface("YggRpcClient", "{channel_name}")

Yggdrasil.YggInterface("YggTimesync", "{channel_name}")

flag = {channel_obj}.send({outputs})

flag, {inputs} = {channel_obj}.recv()

flag, {inputs} = {channel_obj}.call({outputs})

matlab

YggInterface('YggInput', '{channel_name}')

YggInterface('YggOutput', '{channel_name}')

YggInterface('YggRpcServer', '{channel_name}')

YggInterface('YggRpcClient', '{channel_name}')

YggInterface('YggTimesync', '{channel_name}')

flag = {channel_obj}.send({outputs})

[flag, {inputs}] = {channel_obj}.recv()

[flag, {inputs}] = {channel_obj}.call({outputs})

python

from yggdrasil.languages.Python.YggInterface import {commtype}

YggInput("{channel_name}")

YggOutput("{channel_name}")

YggRpcServer("{channel_name}")

YggRpcClient("{channel_name}")

YggTimesync("{channel_name}")

flag = {channel_obj}.send({outputs})

flag, {inputs} = {channel_obj}.recv()

flag, {inputs} = {channel_obj}.call({outputs})