-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThings_R_GraphingThing.xml
21 lines (15 loc) · 6.24 KB
/
Things_R_GraphingThing.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8" standalone="no"?><Entities build="b52" majorVersion="8" minorVersion="0" modelPersistenceProviderPackage="NeoPersistenceProviderPackage" revision="3" schemaVersion="1000"><Things><Thing description="" documentationContent="" effectiveThingPackage="RServeThingPackage" enabled="true" homeMashup="" identifier="" lastModifiedDate="2017-12-09T17:32:57.642-06:00" name="R" projectName="" published="false" tags="" thingTemplate="RServeThing" valueStream=""><Owner name="Administrator" type="User"/><avatar/><DesignTimePermissions><Create/><Read/><Update/><Delete/><Metadata/></DesignTimePermissions><RunTimePermissions/><VisibilityPermissions><Visibility/></VisibilityPermissions><ConfigurationTables><ConfigurationTable description="Connection Monitoring Settings" isMultiRow="false" name="ConnectionMonitoring" ordinal="0"><DataShape><FieldDefinitions><FieldDefinition aspect.defaultValue="30000.0" aspect.friendlyName="Monitor Rate (seconds)" baseType="NUMBER" description="Monitor rate in milliseconds" name="connectionMonitorRate" ordinal="1"/><FieldDefinition aspect.defaultValue="false" aspect.friendlyName="Enable Monitoring" baseType="BOOLEAN" description="Enable connection monitoring" name="enableMonitor" ordinal="0"/><FieldDefinition aspect.defaultValue="1.0" aspect.friendlyName="Number of Retries" baseType="NUMBER" description="Number of retries" name="numberOfRetries" ordinal="2"/><FieldDefinition aspect.defaultValue="2000.0" aspect.friendlyName="Retry Delay (milliseconds)" baseType="NUMBER" description="Retry delay in milliseconds" name="retryDelay" ordinal="3"/></FieldDefinitions></DataShape><Rows><Row><retryDelay>2000.0</retryDelay><connectionMonitorRate>30000.0</connectionMonitorRate><numberOfRetries>1.0</numberOfRetries><enableMonitor>false</enableMonitor></Row></Rows></ConfigurationTable><ConfigurationTable description="" isMultiRow="false" name="RServeConfiguration" ordinal="0"><DataShape><FieldDefinitions><FieldDefinition aspect.defaultValue="localhost" baseType="STRING" description="host address for the RServe Server" name="host" ordinal="0"/><FieldDefinition baseType="PASSWORD" description="" name="password" ordinal="3"/><FieldDefinition aspect.defaultValue="6311" baseType="INTEGER" description="Port for the RServe Server" name="port" ordinal="1"/><FieldDefinition baseType="STRING" description="" name="username" ordinal="2"/></FieldDefinitions></DataShape><Rows><Row><password/><port>6311</port><host><![CDATA[localhost]]></host><username/></Row></Rows></ConfigurationTable></ConfigurationTables><ThingShape><PropertyDefinitions/><ServiceDefinitions><ServiceDefinition aspect.isAsync="false" category="" description="" isAllowOverride="false" isLocalOnly="false" isOpen="false" isPrivate="false" name="GetImage"><ResultType baseType="IMAGE" description="" name="result" ordinal="0"/><ParameterDefinitions><FieldDefinition aspect.dataShape="DataTestShape" baseType="INFOTABLE" description="" name="data" ordinal="1"/></ParameterDefinitions></ServiceDefinition><ServiceDefinition aspect.isAsync="false" category="" description="" isAllowOverride="false" isLocalOnly="false" isOpen="false" isPrivate="false" name="GetImageJS"><ResultType baseType="IMAGE" description="" name="result" ordinal="0"/><ParameterDefinitions/></ServiceDefinition></ServiceDefinitions><EventDefinitions/><ServiceMappings/><ServiceImplementations><ServiceImplementation description="" handlerName="R" name="GetImage"><ConfigurationTables><ConfigurationTable description="R" isMultiRow="false" name="R" ordinal="0"><DataShape><FieldDefinitions><FieldDefinition baseType="STRING" description="code" name="code" ordinal="0"/></FieldDefinitions></DataShape><Rows><Row><code><![CDATA[library("tidyverse")
png(file='whatever.png',width=400,height=350,res=72)
print(ggplot(data=data) + geom_point(mapping = aes(x=label,y=value1)));dev.off()
r <- readBin('whatever.png','raw',1024*1024)
unlink('whatever.png'); r
file.remove('whatever.png')
result <- r]]></code></Row></Rows></ConfigurationTable></ConfigurationTables></ServiceImplementation><ServiceImplementation description="" handlerName="Script" name="GetImageJS"><ConfigurationTables><ConfigurationTable description="Script" isMultiRow="false" name="Script" ordinal="0"><DataShape><FieldDefinitions><FieldDefinition baseType="STRING" description="code" name="code" ordinal="0"/></FieldDefinitions></DataShape><Rows><Row><code><![CDATA[
// result: INFOTABLE dataShape: DataTestShape
var data = Things["DataGenerator"].GenerateData();
var params = {
data: data /* INFOTABLE */
};
// result: INFOTABLE dataShape: "undefined"
var result = me.GetImage(params);
]]></code></Row></Rows></ConfigurationTable></ConfigurationTables></ServiceImplementation></ServiceImplementations><Subscriptions/></ThingShape><PropertyBindings/><RemotePropertyBindings/><RemoteServiceBindings/><RemoteEventBindings/><AlertConfigurations/><ImplementedShapes/><ThingProperties/><ConfigurationChanges><ConfigurationChange changeAction="CREATE" changeReason="" timestamp="2017-12-09T17:20:10.297-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="services : GetImage : Output Updated, Code Updated " timestamp="2017-12-09T17:21:24.553-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:21:48.299-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:24:16.742-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="services : GetImage : Output Updated, GetImageJS : Output Updated " timestamp="2017-12-09T17:25:33.259-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:26:03.898-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:28:29.692-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:30:50.260-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:31:38.429-06:00" user="Administrator"/><ConfigurationChange changeAction="MODIFY" changeReason="" timestamp="2017-12-09T17:32:57.640-06:00" user="Administrator"/></ConfigurationChanges></Thing></Things></Entities>