Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
externalcommunication [2016/09/23 18:29] romulo created |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== External Communication ====== | ||
| - | Dinamica EGO can communicate with external applications by using the functors under the 'External Communication' folder in the Library.\\ | ||
| - | To use the external communication tools, make sure a session is active by checking the status bar for 'Session name: name' (on) or 'External communication: off' (off). | ||
| - | |||
| - | ==== R ==== | ||
| - | The package 'Dinamica' is necessary for sending and receiving data. To install the package, do: | ||
| - | <code> | ||
| - | install.packages(c("Rcpp", "RcppProgress", "Dinamica")) | ||
| - | </code> | ||
| - | |||
| - | You can also install the package using the menu in RStudio: | ||
| - | <code> | ||
| - | Tools -> Install Packages... | ||
| - | </code> | ||
| - | |||
| - | === Session === | ||
| - | To connect to an existing session: | ||
| - | <code> | ||
| - | Dinamica::openSession("DinamicaEGO") where "DinamicaEGO" is the session name. | ||
| - | </code> | ||
| - | |||
| - | === Send/Receive Data === | ||
| - | Number: | ||
| - | <code> | ||
| - | Dinamica::receiveNumber() | ||
| - | Dinamica::sendNumber(number) where 'number' is the number to send. | ||
| - | </code> | ||
| - | |||
| - | List of numbers: | ||
| - | <code> | ||
| - | Dinamica::receiveNumberVector() | ||
| - | Dinamica::sendNumberVector(numberVector) where 'numberVector' is a collection of numbers. | ||
| - | </code> | ||
| - | |||
| - | Lookup Table: | ||
| - | <code> | ||
| - | Dinamica::receiveLookupTable() | ||
| - | Dinamica::sendLookupTable(keys, values) where 'keys' and 'values' are collections of numbers (of same size). | ||
| - | </code> | ||