Class for the PollingChannelURI (PCH_PCU) resource type. This is a virtual resource that represents the polling channel URI of a PollingChannel resource.
| Method | get |
Return the aggregated state internal attribute. |
| Method | handle |
Handle a CREATE request. Fail with error code. |
| Method | handle |
Handle a DELETE request. Delete the latest resource. |
| Method | handle |
Handle a NOTIFY request to a PCU resource. At the PCU, only Responses are delivered. This method is called when a notification is directed to a non-request-reachable target. |
| Method | handle |
Handle a RETRIEVE request. Return resource or block until available. At the PCU, only received requests are retrieved, otherwise this function does not return until a reqeust timeout occurs. Only the AE's originator has access to this virtual resource. |
| Method | handle |
Handle an UPDATE request. Fail with error code. |
| Method | initialize |
This method is called when a new resource is created and before written to the database. |
| Method | set |
Set the aggregated state for a polling channel. This usually reflects the state of the PCU's parent resource, and is maintained by it. |
| Class Variable | request |
Injected RequestManager instance. |
| Class Variable | validator |
Injected Validator instance. |
Inherited from VirtualResource:
| Method | retrieve |
Retrieve the latest or oldest instance of a container resource. |
| Class Variable | dispatcher |
Injected Dispatcher instance. |
| Class Variable | notification |
Injected NotificationManager instance. |
Inherited from Resource (via VirtualResource):
| Method | __contains__ |
Implementation of the membership test operator. |
| Method | __delitem__ |
Implementation of the self[key| operation for deleting attributes. |
| Method | __eq__ |
Test for equality of the resource to another resource. |
| Method | __getattr__ |
Map the normal object attribute access to the internal resource attribute dictionary. |
| Method | __getitem__ |
Implementation of the self[key| operation for retrieving attributes. |
| Method | __init__ |
Initialization of a Resource instance. |
| Method | __repr__ |
Object representation as string. |
| Method | __setitem__ |
Implementation of the self[key] operation for assigning to attributes. |
| Method | __str__ |
String representation of the resource's attributes. |
| Method | activate |
This method is called to activate a resource, usually in a CREATE request. |
| Method | as |
Get the JSON resource representation. |
| Method | attribute |
Return the value of an attribute. |
| Method | can |
Check whether resource is a valild child resource for this resource. |
| Method | child |
Called after a child resource was added to the resource. |
| Method | child |
Called when a child resource of the resource was removed. |
| Method | child |
Called when a child resource was updated. |
| Method | child |
Called before a child will be added to a resource. |
| Method | create |
Create a child resource from a JSON dictionary. |
| Method | db |
Add the resource to the database. |
| Method | db |
Delete the resource from the database. |
| Method | db |
Load a new copy of the same resource from the database. |
| Method | db |
Reload the resource instance from the database. |
| Method | db |
Update the resource in the database. |
| Method | deactivate |
Deactivate an active resource. |
| Method | decrement |
Decrement the subscription counter for the resource. |
| Method | del |
Delete the attribute 'key' from the resource. |
| Method | get |
Get all attributes of the resource. |
| Method | get |
Retrieve the current originator. This could be different from the originator / creator of the resource in case of the custodian attribute is set. |
| Method | get |
Determine and return the final value of an attribute during an update. |
| Method | get |
Retrieve a resource's location coordinates (internal attribute). |
| Method | get |
Retrieve a resource's originator. |
| Method | get |
Retrieve a resource's release version indicator. |
| Method | get |
Retrieve a resource's full structured resource name. |
| Method | get |
Retrieve the subscription counter for the resource. |
| Method | handle |
Process a notification request that is directed to a resource. |
| Method | has |
Check whether an attribute exists for the resource. |
| Method | has |
Test whether a resource supports the specified attribute. This method may be overwritten in sub-classes, for example for virtual resources. |
| Method | increment |
Increment the subscription counter for the resource. |
| Method | is |
Test whether a the resource's type is an announced type. |
| Method | is |
Test whether a resource has been created for another resource. |
| Method | is |
Test whether this resource has been modified after another resource. |
| Method | is |
Test whether the resource is a virtual resource. |
| Method | retrieve |
Retrieve the parent resource of this resouce. |
| Method | retrieve |
Retrieve the raw (!) parent resource of this resouce. |
| Method | select |
Determine the selected attributes for a partial retrieve of a resource. |
| Method | set |
Assign a value to a resource attribute. |
| Method | set |
Save the resource ID for which this resource was created for. |
| Method | set |
Set a resource's location coordinates (internal attribute). |
| Method | set |
Set a resource's originator. |
| Method | set |
Set the resource ID for the resource if not already set. |
| Method | set |
Set the resource name. |
| Method | set |
Assign the release version for a resource. |
| Method | set |
Set a resource's full structured resource name. |
| Method | structured |
Determine the structured path of a resource. |
| Method | type |
Return the resource type as a string. If the resource is a flex container, the specialization is added. |
| Method | update |
Update, add or remove resource attributes. |
| Method | updated |
Signal to a resource that is was successfully updated. |
| Method | validate |
Validate a resource. |
| Method | will |
This method is called before a resource will be deactivated. |
| Method | will |
This method is called before a resource will be send back in a RETRIEVE response. |
| Method | will |
This method is called before a resource will be updated and before calling the update() method. |
| Class Variable | __slots__ |
Slots for the class. |
| Class Variable | factory |
Injected Factory instance. |
| Class Variable | importer |
Injected Importer instance. |
| Class Variable | storage |
Injected Storage instance. |
| Instance Variable | dict |
Dictionary for public and internal resource attributes. |
| Method | _check |
Check whether a referenced ACP resoure exists, and if yes, change the ID in the list to CSE relative unstructured format. |
| Method | _normalize |
Normalize the URLs in the given attribute. |
| Class Variable | _exclude |
Resource attributes that are excluded when updating the resource |
| Instance Variable | _original |
Original dictionary as it was created. This is used for validation in activate() later. |
Handle a NOTIFY request to a PCU resource. At the PCU, only Responses are delivered. This method is called when a notification is directed to a non-request-reachable target.
CSERequest | None = None, id: str | None = None, originator: str | None = None) -> Result:
(source)
¶
Handle a RETRIEVE request. Return resource or block until available. At the PCU, only received requests are retrieved, otherwise this function does not return until a reqeust timeout occurs. Only the AE's originator has access to this virtual resource.
| Parameters | |
request:CSERequest | None | Mandatory for PCU. The original RETRIEVE request. |
id:str | None | Undocumented |
originator:str | None | Request originator. |
| Returns | |
Result | Result instance, with the response set to embeddedRequest. |
This method is called when a new resource is created and before written to the database.
| Parameters | |
pi:str | The parent resource's ID. |
Set the aggregated state for a polling channel. This usually reflects the state of the PCU's parent resource, and is maintained by it.
This attribute is handled as an internal attribute and is only set for oneM2M Release 4 and up.
| Parameters | |
aggregate:bool | None | Boolean indicating whether requests shall be aggregated in a response. |