Contains miscellaneous identifiers used throughout the Qt CoAP module.
更多...
enum class
|
Error
{ Ok, HostNotFound, AddressInUse, TimeOut, BadRequest, …, Unknown }
|
enum class
|
Method
{ Invalid, Get, Post, Put, Delete, Other }
|
enum class
|
MulticastGroup
{ AllCoapNodesIPv4, AllCoapNodesIPv6LinkLocal, AllCoapNodesIPv6SiteLocal }
|
enum
|
Port
{ DefaultPort, DefaultSecurePort }
|
enum class
|
ResponseCode
{ EmptyMessage, Created, Deleted, Valid, Changed, …, InvalidCode }
|
enum class
|
SecurityMode
{ NoSecurity, PreSharedKey, RawPublicKey, Certificate }
|
Indicates the error condition found during processing of the request.
常量
|
值
|
描述
|
QtCoap::Error::Ok
|
0
|
No error condition.
|
QtCoap::Error::HostNotFound
|
1
|
The remote host name was not found.
|
QtCoap::Error::AddressInUse
|
2
|
The address is already in use.
|
QtCoap::Error::TimeOut
|
3
|
The response did not arrive in time.
|
QtCoap::Error::BadRequest
|
4
|
The request was not recognized.
|
QtCoap::Error::Unauthorized
|
5
|
The client is not authorized to perform the requested action.
|
QtCoap::Error::BadOption
|
6
|
The request could not be understood by the server due to one or more unrecognized or malformed options.
|
QtCoap::Error::Forbidden
|
7
|
Access to this resource is forbidden.
|
QtCoap::Error::NotFound
|
8
|
The resource requested was not found.
|
QtCoap::Error::MethodNotAllowed
|
9
|
The server does not allow the method used for the URL requested.
|
QtCoap::Error::NotAcceptable
|
10
|
No resource satisfying the request's acceptance criteria was found.
|
QtCoap::Error::RequestEntityIncomplete
|
11
|
The server has not received the blocks of the request body that it needs to proceed. The client has not sent all blocks, has not sent them in the order required by the server, or sent them long enough ago that the server has already discarded them.
|
QtCoap::Error::PreconditionFailed
|
12
|
One or more conditions given in the request header fields evaluated to false when tested on the server.
|
QtCoap::Error::RequestEntityTooLarge
|
13
|
The request payload is larger than the server is willing or able to process.
|
QtCoap::Error::UnsupportedContentFormat
|
14
|
The payload is in a format not supported by this method on the target resource.
|
QtCoap::Error::InternalServerFault
|
15
|
The server encountered an unexpected condition that prevented it from fulfilling the request.
|
QtCoap::Error::NotImplemented
|
16
|
The server does not support the functionality required to fulfill the request.
|
QtCoap::Error::BadGateway
|
17
|
An error occurred with an upstream server.
|
QtCoap::Error::ServiceUnavailable
|
18
|
The service is currently unavailable.
|
QtCoap::Error::GatewayTimeout
|
19
|
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.
|
QtCoap::Error::ProxyingNotSupported
|
20
|
The server is unable or unwilling to act as a forward-proxy for the URI specified in the Proxy-Uri Option or using the scheme specified in Proxy-Scheme.
|
QtCoap::Error::Unknown
|
21
|
出现未知错误。
|
This enum represents the response code from the CoAP protocol, as defined in
RFC 7252
and
RFC 7959
.
常量
|
值
|
描述
|
QtCoap::ResponseCode::EmptyMessage
|
0x00
|
The response code for an empty message.
|
QtCoap::ResponseCode::Created
|
0x41
|
The request was successful and has resulted in new resources being created. This response code corresponds to HTTP 201 "Created".
|
QtCoap::ResponseCode::Deleted
|
0x42
|
The resource has been successfully deleted. This response code corresponds to HTTP 204 "No Content" but is only used in response to requests that cause the resource to cease being available, such as DELETE and, in certain circumstances, POST.
|
QtCoap::ResponseCode::Valid
|
0x43
|
This response code is related to HTTP 304 "Not Modified" but is only used to indicate that the response identified by the entity-tag given in the ETag Option is valid.
|
QtCoap::ResponseCode::Changed
|
0x44
|
The resource has been successfully modified. This response code corresponds to HTTP 204 "No Content" but is only used in response to POST and PUT requests.
|
QtCoap::ResponseCode::Content
|
0x45
|
The request has succeeded. This response code corresponds to HTTP 200 "OK" but is only used in response to GET requests.
|
QtCoap::ResponseCode::Continue
|
0x5F
|
Indicates that the transfer of the current block was successful, and the server will send more blocks.
|
QtCoap::ResponseCode::BadRequest
|
0xffffffffffffff80
|
The request was not recognized. This response code corresponds to HTTP 400 "Bad Request".
|
QtCoap::ResponseCode::Unauthorized
|
0xffffffffffffff81
|
The client is not authorized to perform the requested action. This response code corresponds to HTTP 401 "Unauthorized".
|
QtCoap::ResponseCode::BadOption
|
0xffffffffffffff82
|
The request could not be understood by the server due to unrecognized options.
|
QtCoap::ResponseCode::Forbidden
|
0xffffffffffffff83
|
Access to this resource is forbidden. This response code corresponds to HTTP 403 "Forbidden".
|
QtCoap::ResponseCode::NotFound
|
0xffffffffffffff84
|
The resource requested was not found. This response code corresponds to HTTP 404 "Not Found".
|
QtCoap::ResponseCode::MethodNotAllowed
|
0xffffffffffffff85
|
The server does not allow the method used for the URL requested. This response code corresponds to HTTP 405 "Method Not Allowed" but with no parallel to the "Allow" header field.
|
QtCoap::ResponseCode::NotAcceptable
|
0xffffffffffffff86
|
No resource satisfying the request's acceptance criteria was found. This response code corresponds to HTTP 406 "Not Acceptable", but with no response entity.
|
QtCoap::ResponseCode::RequestEntityIncomplete
|
0xffffffffffffff88
|
The server has not received all blocks, of the request body, that it needs to proceed.
|
QtCoap::ResponseCode::PreconditionFailed
|
0xffffffffffffff8c
|
Preconditions given in the request header fields evaluated to
false
when tested on the server. This response code corresponds to HTTP 412 "Precondition Failed".
|
QtCoap::ResponseCode::RequestEntityTooLarge
|
0xffffffffffffff8d
|
The request payload is larger than the server is willing or able to process. This response code corresponds to HTTP 413 "Request Entity Too Large".
|
QtCoap::ResponseCode::UnsupportedContentFormat
|
0xffffffffffffff8e
|
The payload is in a format not supported by this method on the target resource. This response code corresponds to HTTP 415 "Unsupported Media Type".
|
QtCoap::ResponseCode::InternalServerFault
|
0xffffffffffffffa0
|
The server encountered an unexpected condition that prevented it from fulfilling the request. This response code corresponds to HTTP 500 "Internal Server Error".
|
QtCoap::ResponseCode::NotImplemented
|
0xffffffffffffffa1
|
The server does not support the functionality required to fulfill the request. This response code corresponds to HTTP 501 "Not Implemented".
|
QtCoap::ResponseCode::BadGateway
|
0xffffffffffffffa2
|
An error occurred with an upstream server. This response code corresponds to HTTP 502 "Bad Gateway".
|
QtCoap::ResponseCode::ServiceUnavailable
|
0xffffffffffffffa3
|
The service is currently unavailable. This response code corresponds to HTTP 503 "Service Unavailable".
|
QtCoap::ResponseCode::GatewayTimeout
|
0xffffffffffffffa4
|
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server. This response code corresponds to HTTP 504 "Gateway Timeout".
|
QtCoap::ResponseCode::ProxyingNotSupported
|
0xffffffffffffffa5
|
The server is unable or unwilling to act as a forward-proxy for the URI specified in the Proxy-Uri Option or using the scheme specified in Proxy-Scheme.
|
QtCoap::ResponseCode::InvalidCode
|
0xFF
|
An invalid response code.
|
Specifies the security mode used for securing a CoAP connection, as defined in
RFC 7252
.