CoAP Protocol constants
DEFAULT_PORT: | default CoAP port as defined in draft-ietf-core-coap-05, section 7.1: MUST be supported by a server for resource discovery and SHOULD be supported for providing access to other resources. |
---|---|
URI_SCHEME_NAME: | |
CoAP URI scheme name as defined in draft-ietf-core-coap-05, section 11.4. | |
MAX_RETRANSMIT: | maximal number of retransmissions before the attempt to transmit a message is canceled |
OBSERVING_REFRESH_INTERVAL: | |
the number of notifications until a CON notification will be used | |
DEFAULT_BLOCK_SIZE: | |
the default block size for block-wise transfers must be power of two between 16 and 1024 bytes. | |
MESSAGE_CACHE_SIZE: | |
capacity (in messages) for caches. Used for duplicate detection and retransmissions. | |
RX_BUFFER_SIZE: | buffer size for incoming datagrams, in bytes |
DEFAULT_OVERALL_TIMEOUT: | |
time (in milliseconds) for transaction to complete. Used to avoid infinite waits for replies to non-confirmables and separate responses | |
RESPONSE_TIMEOUT & RESPONSE_RANDOM_FACTOR: | |
constants to calculate initial timeout for confirmable messages, used by the exponential backoff mechanism | |
TODO: | Find a better value for RX_BUFFER_SIZE |
Registry of all constant status code
codes: | describes the CoAP Code Registry |
---|---|
mediaCodes: | describes the CoAP Media Type Registry |
options: | describes the CoAP Option Number Registry |
Checks whether a code indicates an elective option number.
Parameters: | optionNumber – Code to test |
---|---|
Returns: | True if option number is a valid elective number, False otherwise. |
Checks whether a code indicates a request.
Parameters: | code – code the code to check |
---|---|
Returns: | True if the code indicates a request |
Checks whether a code indicates a response number.
Parameters: | code – Code to test |
---|---|
Returns: | True if option number is a valid response number, False otherwise. |
Checks whether a code indicates a valid.
Parameters: | code – Code to test. |
---|---|
Returns: | True if option number is valid, False otherwise. |
TODO
Parameters: |
|
---|---|
Returns: |
Returns the response class of a code
Parameters: | code – the code to check |
---|---|
Returns: | The response class of the code |
Repeatable string option.
Parameters: |
|
---|---|
Returns: |
TODO
Parameters: |
|
---|---|
Returns: |
The TokenManager stores all tokens currently used in transfers. New transfers can acquire unique tokens from the manager.
get clients map for the given resource path :param request: :param resource:
consecutive response require new MID that must be stored for RST matching :param request:
Pycolo resource.
Parameters: |
|
---|---|
Raise : |
The TokenManager stores all tokens currently used in transfers. New transfers can acquire unique tokens from the manager.
Returns an unique token.
Parameters: | preferEmptyToken – If set to true, the caller will receive the empty token if it is available. |
---|
This is useful for reducing datagram sizes in transactions that are expected to complete in short time. On the other hand, empty tokens are not preferred in block - wise transfers, as the empty token is then not available for concurrent transactions.
Checks if a token is acquired by this manager.
Parameters: | token – The token to check |
---|---|
Returns: | True iff the token is currently in use |