The QKnx::NetIp namespace defines constants, methods, and enumerations related to KNXnet/IP communication. 更多...
头: | #include <NetIp> |
qmake: | QT += knx |
namespace | CemiServer |
enum class | AssignmentMethod { Unknown, Manual, BootP, Dhcp, AutoIp } |
flags | AssignmentMethods |
flags | Capabilities |
enum class | Capability { Unknown, BootP, Dhcp, AutoIp } |
enum class | ConnectionType { Unknown, DeviceManagement, Tunnel, RemoteLogging, RemoteConfiguration, ObjectServer } |
enum class | DescriptionType { Unknown, DeviceInfo, SupportedServiceFamilies, IpConfiguration, CurrentIpConfiguration, …, NotUsed } |
enum class | DeviceState { KnxFault, IpFault } |
enum class | Error { None, HostProtocolType, VersionNotSupported, SequenceNumber, Error, …, ConnectionInUse } |
enum class | HostProtocol { Unknown, UDP_IPv4, TCP_IPv4 } |
enum class | ProgrammingMode { Inactive, Active, Unknown } |
enum class | SearchParameterType { Invalid, SelectByProgrammingMode, SelectByMACAddress, SelectByService, SelectByServiceSRP, RequestDIBs } |
enum class | SecureSessionStatus { AuthenticationSuccess, AuthenticationFailed, Unauthenticated, Timeout, KeepAlive, Close } |
enum | SecureUserId { Reserved, Management, UserRole, Invalid } |
enum class | ServiceFamily { Unknown, Core, DeviceManagement, IpTunneling, IpRouting, …, Security } |
enum class | ServiceType { Unknown, SearchRequest, SearchResponse, DescriptionRequest, DescriptionResponse, …, TimerNotify } |
enum | Timeout { HeartbeatTimeout, ConnectionAliveTimeout, SearchTimeout, DescriptionTimeout, ConnectRequestTimeout, …, SecureSessionAuthenticateTimeout } |
enum class | TunnelLayer { Unknown, Link, Raw, Busmonitor } |
bool | isAssignmentMethod (QKnx::NetIp::AssignmentMethod method ) |
bool | isCapability (QKnx::NetIp::Capability capability ) |
bool | isProgrammingMode (QKnx::NetIp::ProgrammingMode mode ) |
bool | isSecureUserId (QKnx::NetIp::SecureUserId userId ) |
bool | isServiceFamily (QKnx::NetIp::ServiceFamily family ) |
bool | isServiceType (QKnx::NetIp::ServiceType type ) |
bool | isStructType (QKnx::NetIp::HostProtocol type ) |
bool | isStructType (QKnx::NetIp::ConnectionType type ) |
bool | isStructType (QKnx::NetIp::DescriptionType type ) |
bool | isStructType (QKnx::NetIp::SearchParameterType type ) |
bool | isTunnelLayer (QKnx::NetIp::TunnelLayer layer ) |
The common external message interface (cEMI) message format is a generic structure for transmitting KNX frames between cEMI servers and cEMI clients independently of the medium.
This enum describes the enabled IP address assignment methods for setting the current IP address of a KNXnet/IP device.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::AssignmentMethod::Unknown
|
0x00
|
The IP address assignment method is unknown. |
QKnx::NetIp::AssignmentMethod::Manual
|
0x01
|
Manual IP address assignment. |
QKnx::NetIp::AssignmentMethod::BootP
|
0x02
|
IP address assignment via BootP. |
QKnx::NetIp::AssignmentMethod::Dhcp
|
0x04
|
IP address assignment via DHCP. |
QKnx::NetIp::AssignmentMethod::AutoIp
|
0x08
|
IP address is self-assigned by the device. |
The AssignmentMethods type is a typedef for QFlags <AssignmentMethod>. It stores an OR combination of AssignmentMethod values.
This enum describes the IP capabilities supported by the KNXnet/IP device.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::Capability::Unknown
|
0x00
|
The supported IP address assignment capability is unknown. |
QKnx::NetIp::Capability::BootP
|
0x01
|
The device supports IP address assignment via BootP . |
QKnx::NetIp::Capability::Dhcp
|
0x02
|
The device supports IP address assignment via DHCP. |
QKnx::NetIp::Capability::AutoIp
|
0x04
|
The device is capable of assigning itself a unicast IP address in the range of 169.254.1.0 to 169.254.254.255. |
Capabilities 类型是 typedef 对于 QFlags <Capability>。它存储 Capability 值的 OR 组合。
This enum describes the supported KNXnet/IP connection types.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::ConnectionType::Unknown
|
0x00
|
The supported connection type is unknown. |
QKnx::NetIp::ConnectionType::DeviceManagement
|
0x03
|
The connection type used to configure a KNXnet/IP device. |
QKnx::NetIp::ConnectionType::Tunnel
|
0x04
|
The connection type used to send KNX telegrams between two KNXnet/IP devices. |
QKnx::NetIp::ConnectionType::RemoteLogging
|
0x06
|
The connection type used for configuration and data transfer with a remote logging server. |
QKnx::NetIp::ConnectionType::RemoteConfiguration
|
0x07
|
The connection type used for data transfer with a remote configuration server. |
QKnx::NetIp::ConnectionType::ObjectServer
|
0x08
|
The connection type used for configuration and data transfer with an object server in a KNXnet/IP device. |
This enum contains values to self-describe a KNXnet/IP server device.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::DescriptionType::Unknown
|
0x00
|
An unknown description type. |
QKnx::NetIp::DescriptionType::DeviceInfo
|
0x01
|
Device information, such as the KNX medium. |
QKnx::NetIp::DescriptionType::SupportedServiceFamilies
|
0x02
|
Service families supported by the device. |
QKnx::NetIp::DescriptionType::IpConfiguration
|
0x03
|
IP configuration related device information. |
QKnx::NetIp::DescriptionType::CurrentIpConfiguration
|
0x04
|
Current IP configuration of the device. |
QKnx::NetIp::DescriptionType::KnxAddresses
|
0x05
|
All individual addresses assigned to the device. |
QKnx::NetIp::DescriptionType::SecuredServices
|
0x06
|
KNXnet/IP servers supporting the KNXnet/IP secure services as specified by the KNX application note AN159. |
QKnx::NetIp::DescriptionType::TunnelingInfo
|
0x07
|
Tunneling information, such as the maximum interface application protocol data unit (APDU) length and tunneling slot information (individual address and connection status). |
QKnx::NetIp::DescriptionType::ExtendedDeviceInfo
|
0x08
|
Extended device information, such as the KNX medium status, maximum local APDU length and the device descriptor type (mask version). |
QKnx::NetIp::DescriptionType::ManufacturerData
|
0xfe
|
A structure for further data defined by a device manufacturer. |
QKnx::NetIp::DescriptionType::NotUsed
|
0xff
|
This value may not be used. |
This enum describes the state information of a KNXnet/IP device.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::DeviceState::KnxFault
|
0x00
|
The state is set if the KNX network cannot be accessed. |
QKnx::NetIp::DeviceState::IpFault
|
0x01
|
The state is set if the IP network cannot be accessed. |
This enum describes the KNXnet/IP communication errors that can occur.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::Error::None
|
0x00
|
没有出现错误。 |
QKnx::NetIp::Error::HostProtocolType
|
0x01
|
The requested host protocol is not supported by the KNXnet/IP device. |
QKnx::NetIp::Error::VersionNotSupported
|
0x02
|
The requested protocol version is not supported by the KNXnet/IP device. |
QKnx::NetIp::Error::SequenceNumber
|
0x04
|
The received sequence number is out of sync. |
QKnx::NetIp::Error::Error
|
0x0f
|
An undefined, possibly implementation specific error occurred. |
QKnx::NetIp::Error::ConnectionId
|
0x21
|
The KNXnet/IP server device cannot find an active data connection with the specified ID. |
QKnx::NetIp::Error::ConnectionType
|
0x22
|
The KNXnet/IP server device does not support the requested connection type. |
QKnx::NetIp::Error::ConnectionOption
|
0x23
|
The KNXnet/IP server device does not support one or more requested connection options. |
QKnx::NetIp::Error::NoMoreConnections
|
0x24
|
The KNXnet/IP server device cannot accept the new data connection because its maximum amount of concurrent connections is already used. |
QKnx::NetIp::Error::NoMoreUniqueConnections
|
0x25
|
The KNXnet/IP tunneling server could provide a connection (in contrast to
NoMoreConnections
) if only the KNXnet/IP tunneling address that would be assigned to the connection would be unique.
|
QKnx::NetIp::Error::DataConnection
|
0x26
|
The KNXnet/IP server device detects an error concerning the data connection with the specified ID. |
QKnx::NetIp::Error::KnxConnection
|
0x27
|
The KNXnet/IP server device detects an error concerning the KNX connection with the specified ID. |
QKnx::NetIp::Error::Authorization
|
0x28
|
The KNXnet/IP client is not authorized to use the requested individual address in the extended connection request information (CRI) structure. |
QKnx::NetIp::Error::TunnelingLayer
|
0x29
|
The requested tunneling layer is not supported by the KNXnet/IP server device. |
QKnx::NetIp::Error::NoTunnelingAddress
|
0x2d
|
The address requested in the extended CRI structure is not a tunneling individual address. |
QKnx::NetIp::Error::ConnectionInUse
|
0x2e
|
The individual address requested for this connection is already in use. |
This enum describes the KNXnet/IP host protocol codes for an IP network.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::HostProtocol::Unknown
|
0x00
|
The supported KNXnet/IP device host protocol is unknown. |
QKnx::NetIp::HostProtocol::UDP_IPv4
|
0x01
|
The supported KNXnet/IP device host protocol is UDP/IPv4. |
QKnx::NetIp::HostProtocol::TCP_IPv4
|
0x02
|
The supported KNXnet/IP device host protocol is TCP/IPv4. |
This enum describes the programming mode state of a KNX device.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::ProgrammingMode::Inactive
|
0x00
|
The device is not in programming mode. |
QKnx::NetIp::ProgrammingMode::Active
|
0x01
|
The device is in programming mode. |
QKnx::NetIp::ProgrammingMode::Unknown
|
0xff
|
The programming state of the device is unknown. |
This enum is used in an extended search request to filter out devices in the KNXnet/IP server discovery phase.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::SearchParameterType::Invalid
|
0x00
|
The extended search request parameter contains an invalid value. Usually the invalid value is used to test the behavior of a KNXnet/IP router or server for unknown SRPs. |
QKnx::NetIp::SearchParameterType::SelectByProgrammingMode
|
0x01
|
Client is interested only in the response from KNXnet/IP servers in programming mode currently enabled. |
QKnx::NetIp::SearchParameterType::SelectByMACAddress
|
0x02
|
Client is interested only in the response from KNXnet/IP servers with the given MAC address. |
QKnx::NetIp::SearchParameterType::SelectByService
|
0x03
|
Client is interested only in the response from KNXnet/IP servers supporting the given KNXnet/IP service family in at least the given version. |
QKnx::NetIp::SearchParameterType::SelectByServiceSRP
|
0x03
|
This enum value has been deprecated. Use SelectByService instead. |
QKnx::NetIp::SearchParameterType::RequestDIBs
|
0x04
|
Client includes this search request parameter (SRP) to indicate that it is interested in the listed DIBs. This SRP shall not influence the decision of the KNXnet/IP server whether or not to respond to the search request. |
该枚举在 Qt 5.12 引入或被修改。
This enum is used in a frame sent at any stage of the secure session handshake to indicate an error condition or status information.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::SecureSessionStatus::AuthenticationSuccess
|
0x00
|
The user was successfully authenticated. |
QKnx::NetIp::SecureSessionStatus::AuthenticationFailed
|
0x01
|
An error occurred during secure session handshake. |
QKnx::NetIp::SecureSessionStatus::Unauthenticated
|
0x02
|
The session is not yet authenticated. |
QKnx::NetIp::SecureSessionStatus::Timeout
|
0x03
|
A timeout occurred during secure session handshake. |
QKnx::NetIp::SecureSessionStatus::KeepAlive
|
0x04
|
Prevent inactivity on the secure session. Without the keep-alive signal, the KNXnet/IP device can drop the connection with a timeout error. |
QKnx::NetIp::SecureSessionStatus::Close
|
0x05
|
The secure session must be closed. |
该枚举在 Qt 5.12 引入或被修改。
The ID of the management client (MaC) or user that is used for the authentication of the secure session.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::Reserved
|
0x00
|
Reserved, please do not use. |
QKnx::NetIp::Management
|
0x01
|
The management user ID. |
QKnx::NetIp::UserRole
|
0x02
|
The first value in the possible range of user IDs. |
QKnx::NetIp::Invalid
|
0x80
|
Invalid, please do not use any ID equal to or more than this value. |
The management server (MaS) will use the user ID as an index into the password hashes table to authenticate the MaC.
The access level (management or user level access - with possibly any device dependent role) will determine the set of services accepted by the MaS after authentication.
User ID | 描述 |
---|---|
Management
|
This user ID requests access to all resources exposed by the MaS including device management. |
User
|
This user ID requests access to all resources exposed by the MaS except device management. |
In addition to access level, the user ID serves as an index into the tunneling user table to determine if there are individual addresses associated with the user. The management user ID has implicit access to all available tunneling addresses.
该枚举在 Qt 5.13 引入或被修改。
This enum holds the service family that the communication is related to. The service family is the high octet of the values of the ServiceType 枚举。
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::ServiceFamily::Unknown
|
0x00
|
Unknown service family. |
QKnx::NetIp::ServiceFamily::Core
|
0x02
|
Core service family. |
QKnx::NetIp::ServiceFamily::DeviceManagement
|
0x03
|
Device management service family. |
QKnx::NetIp::ServiceFamily::IpTunneling
|
0x04
|
Tunneling service family. |
QKnx::NetIp::ServiceFamily::IpRouting
|
0x05
|
Routing service family. |
QKnx::NetIp::ServiceFamily::RemoteLogging
|
0x06
|
Remote logging service family. |
QKnx::NetIp::ServiceFamily::RemoteConfigAndDiagnosis
|
0x07
|
Remote configuration and diagnosis service family. |
QKnx::NetIp::ServiceFamily::ObjectServer
|
0x08
|
Object server service family. |
QKnx::NetIp::ServiceFamily::Security
|
0x09
|
Security service family. |
This enum describes KNXnet/IP frame service type identifiers.
The KNXnet/IP service type identifier defines the kind of action to be performed and the type of the data payload contained in the KNXnet/IP body. The high octet of the KNXnet/IP service type identifier denotes the ServiceFamily .
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::ServiceType::Unknown
|
0x0000
|
The service type of the KNXnet/IP frame is unknown. |
QKnx::NetIp::ServiceType::SearchRequest
|
0x0201
|
The service type sent by a KNXnet/IP client to search for available KNXnet/IP servers. |
QKnx::NetIp::ServiceType::SearchResponse
|
0x0202
|
The service type sent by a KNXnet/IP server when responding to a search request. |
QKnx::NetIp::ServiceType::DescriptionRequest
|
0x0203
|
The service type sent by a KNXnet/IP client to a KNXnet/IP server to retrieve information about capabilities and supported services. |
QKnx::NetIp::ServiceType::DescriptionResponse
|
0x0204
|
The service type sent by a KNXnet/IP server in response to a description request to provide information about the KNXnet/IP server implementation. |
QKnx::NetIp::ServiceType::ConnectRequest
|
0x0205
|
The service type sent by a KNXnet/IP client to establish a communication channel with a KNXnet/IP server. |
QKnx::NetIp::ServiceType::ConnectResponse
|
0x0206
|
The service type sent by a KNXnet/IP server in response to a connect request frame. |
QKnx::NetIp::ServiceType::ConnectionStateRequest
|
0x0207
|
The service type sent by a KNXnet/IP client requesting the connection state of an established connection with a KNXnet/IP server. |
QKnx::NetIp::ServiceType::ConnectionStateResponse
|
0x0208
|
The service type sent by a KNXnet/IP server when receiving a connection state request for an established connection. |
QKnx::NetIp::ServiceType::DisconnectRequest
|
0x0209
|
The service type sent by a KNXnet/IP device to terminate an established connection. |
QKnx::NetIp::ServiceType::DisconnectResponse
|
0x020a
|
The service type sent by a KNXnet/IP device in response to a disconnect request. |
QKnx::NetIp::ServiceType::ExtendedSearchRequest
|
0x020b
|
The service type sent by a KNXnet/IP device during the discovery phase looking for any listening KNXnet/IP servers or for a specific one. |
QKnx::NetIp::ServiceType::ExtendedSearchResponse
|
0x020c
|
The service type sent by a KNXnet/IP device in response to an extended search request. |
QKnx::NetIp::ServiceType::DeviceConfigurationRequest
|
0x0310
|
The service type sent to read or write KNXnet/IP device configuration data. |
QKnx::NetIp::ServiceType::DeviceConfigurationAcknowledge
|
0x0311
|
The service type sent by a KNXnet/IP device to confirm the reception of a device configuration request. |
QKnx::NetIp::ServiceType::TunnelingRequest
|
0x0420
|
The service type used for sending and receiving single KNX frames between a KNXnet/IP client and server. |
QKnx::NetIp::ServiceType::TunnelingAcknowledge
|
0x0421
|
The service type sent by a KNXnet/IP client or server to confirm the reception of the tunneling request. |
QKnx::NetIp::ServiceType::TunnelingFeatureGet
|
0x0422
|
The service feature type used by the KNXnet/IP tunneling client to read the value of a feature from the KNXnet/IP tunneling server. |
QKnx::NetIp::ServiceType::TunnelingFeatureResponse
|
0x0423
|
The service feature type used by the KNXnet/IP tunneling server to respond to a feature get or set request by the KNXnet/IP tunneling client. |
QKnx::NetIp::ServiceType::TunnelingFeatureSet
|
0x0424
|
The service feature type used by the KNXnet/IP tunneling client to set the value of a feature of the KNXnet/IP tunneling server. |
QKnx::NetIp::ServiceType::TunnelingFeatureInfo
|
0x0425
|
The service feature type used by the KNXnet/IP tunneling server to inform the KNXnet/IP tunneling client on a value of an interface feature. |
QKnx::NetIp::ServiceType::RoutingIndication
|
0x0530
|
The service type used for sending KNX frames over IP networks. |
QKnx::NetIp::ServiceType::RoutingLostMessage
|
0x0531
|
The service type used to indicate that KNXnet/IP routing frames were lost. |
QKnx::NetIp::ServiceType::RoutingBusy
|
0x0532
|
The service type used to indicate that a KNXnet/IP router or KNX IP device received more datagrams than it can process. |
QKnx::NetIp::ServiceType::RoutingSystemBroadcast
|
0x0533
|
The service type used for adding a new KNXnet/IP device into an already configured domain when the device is not in the same network as the management client (MaC). |
QKnx::NetIp::ServiceType::SecureWrapper
|
0x0950
|
The service type used for sending an encrypted frame including data to ensure integrity and freshness. |
QKnx::NetIp::ServiceType::SessionRequest
|
0x0951
|
The service type used to initiate the secure connection setup handshake for a new secure communication session. |
QKnx::NetIp::ServiceType::SessionResponse
|
0x0952
|
The service type used to respond to a received secure session request frame. |
QKnx::NetIp::ServiceType::SessionAuthenticate
|
0x0953
|
The service type used after the Diffie-Hellman handshake to authenticate the user against the server. |
QKnx::NetIp::ServiceType::SessionStatus
|
0x0954
|
The service type used to send a frame at any stage of the secure session handshake to indicate an error condition or status information. |
QKnx::NetIp::ServiceType::TimerNotify
|
0x0955
|
The service type used to ensure synchronization of the multicast group member's timer values. |
This enum describes the timeouts used during KNXnet/IP communication.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::HeartbeatTimeout
|
60000
|
Timeout used between sending the next connection state request frame to the KNXnet/IP server. |
QKnx::NetIp::ConnectionAliveTimeout
|
120000
|
Timeout before sending a disconnect request to the KNXnet/IP client after the last correctly received message frame. |
QKnx::NetIp::SearchTimeout
|
3000
|
Timeout after sending a search request that the KNXnet/IP client will wait for search response frames from KNXnet/IP servers. |
QKnx::NetIp::DescriptionTimeout
|
3000
|
Timeout after sending a description request that the KNXnet/IP client will wait for description response frames from KNXnet/IP servers. |
QKnx::NetIp::ConnectRequestTimeout
|
10000
|
The KNXnet/IP client will wait for 10 seconds to receive a connect response frame from the KNXnet/IP server. |
QKnx::NetIp::ConnectionStateRequestTimeout
|
10000
|
The KNXnet/IP client will wait for 10 seconds for a connection state response from the KNXnet/IP server after sending a connection state request. |
QKnx::NetIp::DisconnectRequestTimeout
|
10000
|
The KNXnet/IP client will wait for 10 seconds to receive a disconnect response frame from the KNXnet/IP server. |
QKnx::NetIp::DeviceConfigurationRequestTimeout
|
10000
|
The KNXnet/IP client will wait for 10 seconds for a device configuration response from the KNXnet/IP server after sending a device configuration request. |
QKnx::NetIp::TunnelingRequestTimeout
|
1000
|
The KNXnet/IP client will wait for 1 second for a tunneling acknowledge response from the KNXnet/IP server after sending a tunneling request. |
QKnx::NetIp::RoutingBusyWaitTime
|
100
|
The timeout used to empty the incoming queue of a KNXnet/IP router or KNX IP device if the number of received datagrams exceeds the number of frames that the device can actually process. |
QKnx::NetIp::SecureSessionTimeout
|
60000
|
The maximum time an authenticated secure session can remain unused without any communication before the secure session gets dropped. |
QKnx::NetIp::SecureSessionRequestTimeout
|
10000
|
The maximum time the KNXnet/IP client will wait for the session response from the KNXnet/IP server after sending a session request. |
QKnx::NetIp::SecureSessionAuthenticateTimeout
|
10000
|
The maximum time the authentication process for a newly created secure session may last until the unauthenticated session will be dropped. |
This enum describes the KNX tunneling layer to establish.
常量 | 值 | 描述 |
---|---|---|
QKnx::NetIp::TunnelLayer::Unknown
|
0x00
|
The tunneling layer to establish is unknown. |
QKnx::NetIp::TunnelLayer::Link
|
0x02
|
Establish a data link layer tunnel to the KNX network. |
QKnx::NetIp::TunnelLayer::Raw
|
0x04
|
Establish a raw tunnel to the KNX network. |
QKnx::NetIp::TunnelLayer::Busmonitor
|
0x80
|
Establish a bus monitor tunnel to the KNX network. |
返回
true
if the specified
method
is a part of the
AssignmentMethod
enumeration; otherwise returns
false
.
返回
true
if the specified
capability
is a part of the
Capability
enumeration; otherwise returns
false
.
返回
true
if the specified
mode
is a part of the
ProgrammingMode
enumeration; otherwise returns
false
.
返回
true
if the specified
userId
is a in the range of the
SecureUserId
enumeration; otherwise returns
false
.
该函数在 Qt 5.13 引入。
返回
true
if the specified
family
is a part of the
ServiceFamily
enumeration; otherwise returns
false
.
返回
true
if the specified
type
is a part of the
ServiceType
enumeration; otherwise returns
false
.
返回
true
if the specified
type
is a part of the
HostProtocol
enumeration; otherwise returns
false
.
返回
true
if the specified
type
is a part of the
ConnectionType
enumeration; otherwise returns
false
.
返回
true
if the specified
type
is a part of the
DescriptionType
enumeration; otherwise returns
false
.
返回
true
if the specified
type
is a part of the
SearchParameterType
enumeration; otherwise returns
false
.
该函数在 Qt 5.12 引入。
返回
true
if the specified
layer
is a part of the
TunnelLayer
enumeration; otherwise returns
false
.