class documentation

class CSERequest:

View In Hierarchy

Structure that holds all the attributes for a Request (or a Response) to a CSE.

Method __post_init__ Post initialization actions.
Method convertToR1Target Remove the Release Version Indicator and the Vendor Information from a request if the request targets a target that only supports release 1.
Method fillOriginalRequest Create an originalRequest from at least some request attributes. This overwrites the internal originalRequest attribute.
Class Variable coapAccept CoAP Accept Option media type.
Class Variable credentials Request credentials for HTTP, WebSockets etc.
Class Variable csi The CSE-ID of the target's hosting CSI. Might not be present in a request. Based on the value of to.
Class Variable ct Content Serialization Type.
Class Variable ec Event Category.
Class Variable fc Filter Criteria complex structure.
Class Variable httpAccept http Accept header media type.
Class Variable id Target resource ID. Might be structured or unstructured. Based on the value of to.
Class Variable ma maxAge
Class Variable oet Operation Execution Time in ISO8901 format or as ms (X-M2M-OET).
Class Variable op Request Operation.
Class Variable originalData The request's original data.
Class Variable originalOriginator The original originator of the request, as received in the request. This is used to keep track of the original originator, even if the request is forwarded or processed internally.
Class Variable originator Request originator (from, X-M2M-Origin).
Class Variable ot Originating Timestamp in ISO8901 format.
Class Variable pc The request's primitive content as a dictionary.
Class Variable rcn Result Content Type.
Class Variable rp Result Persistence.
Class Variable rq_authn Whether the request is authenticated. See TS-0003, clause 7.1.2.
Class Variable rqet Request Expiration Timestamp in ISO8901 format (X-M2M-RET).
Class Variable rqi Request Identifier (X-M2M-RI).
Class Variable rset Result Expiration Time in ISO8901 format or as ms (X-M2M-RST).
Class Variable rtu The notificationURI element of the Response Type parameter(X-M2M-RTU).
Class Variable rvi Release Version Identifier (X-M2M-RVI).
Class Variable selectedAttributes Selected attributes that filter the resource attributes in the response. This list refers to the resource attributes, ie. one level below the resource.
Class Variable spid The Service Provider ID of the target's hosting CSI. Might not be present in a request. Based on the value of to.
Class Variable sqi Semantic Query Indicator
Class Variable srn The target's structured resource ID. Might not be present in a request. Based on the value of to.
Class Variable to The request's original target.
Class Variable topElememt The top element of the request or response.
Class Variable ty Resource type.
Class Variable vsi Vendor Information (X-M2M-VSI).
Instance Variable originalRequest The original request after dissection as a dictionary.
Class Variable _attributeList List of attribute names if this is a partial request. Otherwise not set.
Class Variable _directURL The direct URL of the request.
Class Variable _ma maxAge duration converted
Class Variable _outgoing Whether this is a request sent by the CSE.
Class Variable _rpts Result Persistence (rp) as a timestamp.
Class Variable _rqetUTCts Request Expiration Timestamp as UTC-based timestamp (internal).
Class Variable _rsetUTCts Result Expiration Timestamp as UTC-based timestamp (internal).
Instance Variable _ot The timestamp when this request object was created.
def __post_init__(self):

Post initialization actions.

def convertToR1Target(self, targetRvi: str) -> CSERequest:

Remove the Release Version Indicator and the Vendor Information from a request if the request targets a target that only supports release 1.

Parameters
targetRvi:strThe target's supported release version.
Returns
CSERequestA deep copy of the request, with the fields removed or set to None.
def fillOriginalRequest(self, update: bool = False):

Create an originalRequest from at least some request attributes. This overwrites the internal originalRequest attribute.

coapAccept: ContentSerializationType | None =

CoAP Accept Option media type.

credentials: RequestCredentials | None =

Request credentials for HTTP, WebSockets etc.

csi: str | None =

The CSE-ID of the target's hosting CSI. Might not be present in a request. Based on the value of to.

Content Serialization Type.

ec: EventCategory | None =

Event Category.

Filter Criteria complex structure.

httpAccept: list[str] | None =

http Accept header media type.

id: str | None =

Target resource ID. Might be structured or unstructured. Based on the value of to.

ma: str | None =

maxAge

oet: str | None =

Operation Execution Time in ISO8901 format or as ms (X-M2M-OET).

op: Operation | None =

Request Operation.

originalData: bytes | None =

The request's original data.

originalOriginator: str | None =

The original originator of the request, as received in the request. This is used to keep track of the original originator, even if the request is forwarded or processed internally.

originator: str | None =

Request originator (from, X-M2M-Origin).

ot: str | None =

Originating Timestamp in ISO8901 format.

pc: JSON | None =

The request's primitive content as a dictionary.

rcn: ResultContentType | None =

Result Content Type.

rp: str | None =

Result Persistence.

rq_authn: bool =

Whether the request is authenticated. See TS-0003, clause 7.1.2.

rqet: str | None =

Request Expiration Timestamp in ISO8901 format (X-M2M-RET).

rqi: str | None =

Request Identifier (X-M2M-RI).

rset: str | None =

Result Expiration Time in ISO8901 format or as ms (X-M2M-RST).

rtu: list[str] | None =

The notificationURI element of the Response Type parameter(X-M2M-RTU).

rvi: str | None =

Release Version Identifier (X-M2M-RVI).

selectedAttributes: list[str] =

Selected attributes that filter the resource attributes in the response. This list refers to the resource attributes, ie. one level below the resource.

spid: str | None =

The Service Provider ID of the target's hosting CSI. Might not be present in a request. Based on the value of to.

sqi: bool | None =

Semantic Query Indicator

srn: str | None =

The target's structured resource ID. Might not be present in a request. Based on the value of to.

to: str | None =

The request's original target.

topElememt: str | None =

The top element of the request or response.

ty: ResourceTypes | None =

Resource type.

vsi: str | None =

Vendor Information (X-M2M-VSI).

originalRequest: JSON | None =

The original request after dissection as a dictionary.

_attributeList: list[str] =

List of attribute names if this is a partial request. Otherwise not set.

_directURL: str | None =

The direct URL of the request.

_ma: float | None =

maxAge duration converted

_outgoing: bool =

Whether this is a request sent by the CSE.

_rpts: str | None =

Result Persistence (rp) as a timestamp.

_rqetUTCts: float | None =

Request Expiration Timestamp as UTC-based timestamp (internal).

_rsetUTCts: float | None =

Result Expiration Timestamp as UTC-based timestamp (internal).

_ot: float | None =

The timestamp when this request object was created.