7.2 Call Flows
7.2.1 Application registration and Access control policy creation
Call flows regarding the registration phase depicted in figure 7.2.1-1 are ordered as follows:
- Gateway (MN-CSE) registers with the oneM2M service platform (IN-CSE).
- Gateway application (MN-AE) registers with the gateway (MN-CSE).
- Light applications (ADN-AE1 and ADN-AE2) register with the gateway (MN-CSE).
- Smartphone application (IN-AE) registers with the oneM2M service platform (IN-CSE).
- Gateway application (MN-AE) discovers the smartphone application (IN-AE) from gateway (MN-CSE) with specific filter criteria. The discovered IN-AE is granted access to the remote light control service containers.
- Gateway application (MN-AE) creates an accessControlPolicy resource granting all the entities playing roles in the current use case including ADN-AE1, ADN-AE2, MN-AE and IN-AE access to the created container and content instance resources.
Figure 7.2.1-1: Registration phase call flows
7.2.2 Initial resource creation
Call flows regarding the initial resource creation phase depicted in figure 7.2.2-1 are ordered as follows:
- Gateway application (MN-AE) creates a group resource on gateway (MN-CSE), for updating and retrieving group light state named as containers _group . The group members are added from the list of discovered container resources that the MN-AE discovers. The group resource is created with a link to the same access control policy.
- Two container resources are created in the gateway (MN-CSE) to store the light states under the registered light application ADN-AE1 and ADN-AE2, respectively. The containers are created with a link to the same access control policy.
- Content Instance resources are created by light applications (ADN-AE1 and ADN-AE2) under each created container and represent the controlled light states.
- Subscription resources are created under the containers in the gateway (MN-CSE) so that subscribers, i.e. light applications, can be notified whenever there is a new contentInstance resource created by the IN-AE.
Figure 7.2.2-1: Initial resource creation phase call flows
7.2.3 Discovery of group resources
Call flows regarding the discovery and update of group resources are depicted in figure 7.2.3-1 and ordered as follows:
- Gateway application (MN-AE) periodically sends a RETRIEVE request including the parameter filterUsage and specific filter criteria condition(s) as a query string for discovery of container resources stored in the MN-CSE of gateway. The filter criteria conditions for the discovery operation include createdBefore, createdAfter, modifiedSince, unmodifiedSInce, label, creator, expireAfter, resourceType etc.
- Gateway (MN-CSE) responds with URIs of the discovered container resources, if any, to the gateway application (MN-AE) according to the filter criteria(s).
- Gateway application (MN-AE) sends a update request to update the list of group members within the previously created group resource with identifiers of the discovered containers.
Figure 7.2.3-1: Discovery and group light state update phase call flows
7.2.4 Discovery and retrieval of contentInstance resources
Call flows regarding the discovery and retrieval of contentInstance resources depicted in figure 7.2.4-1 and 7.2.4-2 are ordered as follows:
- The smartphone application (IN-AE) periodically sends a RETRIEVE request including the parameter filterUsage and specific filter criteria condition(s) as a query string for discovery of container resources stored in the MN-CSE of gateway.
- The IN-AE also sends a Discovery request to the MN-CSE for the discovery of the group resources located in the MN-CSE.
- The gateway (MN-CSE) responds to the IN-AE with URIs of the discovered container resources under ADN-AE1 and ADN-AE2, if any.
For the case where the IN-AE sends a Discovery request for the discovery of group resources, the MN-CSE responds to the IN-AE with the URIs of the discovered group resources located in the MN-CSE, if any. - The IN-AE sends GET requests for retrieval of the latest contentInstance resources from each discovered light container resource.
In the case of retrieval of the latest contentInstance resources of the group of containers, the IN-AE sends a retrieve request to the fanOutPoint of the discovered group resource. - The MN-CSE responds to the IN-AE with the latest light state(s).
Figure 7.2.4-1: Discovery and single light retrieval phase call flows
Figure 7.2.4-2 Discovery and a group of lights retrieval phase call flows