Version 3 (modified by 14 years ago) (diff) | ,
---|
Resource Access Interface
There is no single resource access interface in the SENSEI architecture, instead each resource description published by a REP includes information about the interface(s) available to access it, for example the URL and interface description. In order for Resource Users to easily access resources, a set of well-known resource interfaces have been defined for sensor, parameter, actuator and code-update resource types.
How to connect to these URLs using REST is described in the Connecting a Resource User section. A short example of how a response looks like is this:
<rdf:RDF> <nmib:Location mo:direction="" mo:hasTimeStamp="" mo:latitude="" mo:line="24" mo:longitude="" mo:nextStationDistance="" mo:nextStationID="" mo:nextStationName="" rdf:about="http://www.resource-provider-456.com/resources#location"/> </rdf:RDF>
All responses are in the XML-RDF format so that the Semantic Query Analyser can work with them. How a Resource User gets this reference is by either querying an SQR or an RD. (see [[RuRli| the RLI Interface). Ofcourse another way would be to browse an RD directly (/rd url) and to read all resources available, but this works only on small sites.
The URL is provided by the Rep-Locator entry of the Resource Directory Description.
A resource may have one or more such urls, and even publish URL behind company proxies.
<REP-Locator> http://195.178.44.184/rephandler/gps/358278005846910 </REP-Locator>
It is up to the client to detect if it will use IPv6 or IPv4 addresses and to select the best connected resource.
The whole RD entry looks like this:
<Resource-Description> − <Resource-ID> urn:sensei:ericsson.com:EnvironmentalSensors:busgps:358278005846910 </Resource-ID> <Name>Bus Location Sensors in Belgrade</Name> <Storage-ID>6</Storage-ID> <Expiration-Time>11-01-01T00:00:00+00:00</Expiration-Time> <Tag>Bus</Tag> <Tag>GPS</Tag> <Tag>Sensor</Tag> <Tag>Belgrade</Tag> <Tag>24</Tag> <Tag>358278005846910</Tag> − <Rai-Description> <RAI-ID>tempID</RAI-ID> <Description>GET returns sensor values (RDF)</Description> − <REP-Locator> http://195.178.44.184/rephandler/gps/358278005846910 </REP-Locator> </Rai-Description> </Resource-Description>