HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file pal.control.RestAPI by barry
expand copy to clipboardexpand
/* { "description" : "Wrapper interface around the REST API for the perception and assembly elements of the PAL framework. Calls on this interface are translated to RESTful web server calls against the specified serverAddress and port." } */

uses data.String
uses time.DateTime
uses pal.Perception
uses pal.Assembly

interface RestAPI {
	
	/* { "@description" : "Instantiate a REST API instance which will connect to the given address and port for each call." } */
	RestAPI(char serverAddress[], int port)
	
	/* { "@description" : "Get the list of configuration options from the remote server." } */
	String[] getConfigs()
	
	/* { "@description" : "Get the currently selected configuration from the remote server." } */
	char[] getConfig()
	
	/* { "@description" : "Set the current configuration at the remote server." } */
	bool setConfig(char str[])
	
	/* { "@description" : "Get the latest batch of perception data from the remote server." } */
	PerceptionData getPerception()
	
	/* { "@description" : "Get the local system path from the remote server." } */
	char[] getSystemPath()
	
	/* { "@description" : "Add a new component option at the remote server (assumes str is a path present in the local file system of the remote server)." } */
	bool addComponent(char str[])
	
	/* { "@description" : "Remove a component option at the remote server (assumes str is a path present in the local file system of the remote server)." } */
	bool remComponent(char str[])
	
	/* { "@description" : "Update a component option at the remote server with a newer version (assumes str is a path present in the local file system of the remote server)." } */
	char[] updComponent(char str[])
	
	/* { "@description" : "Add an interceptor at the remote server (assumes cmp is a path present in the local file system of the remote server)." } */
	bool addIntercept(char intf[], char cmp[])
	
	/* { "@description" : "Remove an interceptor at the remote server (assumes cmp is a path present in the local file system of the remote server)." } */
	bool remIntercept(char intf[], char cmp[])
	
	/* { "@description" : "Get the list of installed interceptors at the remote server." } */
	InterceptInfo[] getIntercepts()
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n pal.control.RestAPI -m "reason for update" -u yourUsername
Version 2 (this version) by barry
Notes for this version: Updates docstrings, removes legacy functionality
Version 1 by barry