This is a wrapper around the functions found in kdrive_express_access.h. More...
#include <Access.h>
Public Member Functions | |
~AccessPort () | |
Destructor cleans up unmanaged and managed resources. More... | |
int | GetId () |
void | SetKeyring (Keyring^ keyring) |
Sets the used knx keyring project. More... | |
int | EnumerateUsb () |
Scan for all KNX USB Interface devices. More... | |
void | OpenUsb (int interfaceIndex) |
Opens a connection to a KNX USB Interface device interfaceIndex should be in the range 0..iface_count-1 where iface_count is > 0. More... | |
System::Collections::Generic::List< KnxNetIpDeviceDescription^> ^ | EnumerateIpTunneling () |
Scans for all KNX IP Tunneling Interface devices. More... | |
KnxNetIpDeviceDescription ^ | ReadIpDeviceInfo (System::String^ address) |
Gets the information for one specific tunneling device. | |
KnxNetIpDeviceDescription ^ | ReadIpDeviceInfo (System::String^ address, int port) |
Gets the information for one specific tunneling device. | |
KnxNetIpDeviceDescription ^ | ReadIpDeviceInfo (System::String^ address, System::String^ interfaceAddress) |
Gets the information for one specific tunneling device. | |
KnxNetIpDeviceDescription ^ | ReadIpDeviceInfo (System::String^ address, int port, System::String^ interfaceAddress) |
Gets the information for one specific tunneling device. | |
void | OpenIpTunneling (System::String^ address) |
Opens a connection to a KNX IP Tunneling Interface device Default port for KNXnet/IP (3671) is used. More... | |
void | OpenIpTunneling (System::String^ address, int port) |
Opens a connection to a KNX IP Tunneling Interface device on a specific network interface. More... | |
void | OpenIpTunneling (System::String^ address, int port, System::String^ interfaceAddress) |
Opens a connection to a KNX IP Tunneling Interface device on a specific network interface. More... | |
void | OpenIp (System::String^ address) |
void | OpenIp (System::String^ address, System::String^ interfaceAddress) |
bool | IsTunnelingPortSecure () |
Only has works for knxnet ip tunneling ports, returns if security is used or not. | |
void | SetTunnelingPortAuthenticationCode (System::String^ authenticationCode) |
Sets the optional authentication code for the KNXnet/IP tunneling connection. More... | |
void | SetTunnelingPortCredentials (int userId, System::String^ password) |
Sets the user id and the security password for the KNXnet/IP tunneling connection. More... | |
void | SetTunnelingPortUserId (int userId) |
Sets the security user id for the KNXnet/IP tunneling connection. More... | |
int | GetTunnelingPortUserId () |
Gets the security user id for the KNXnet/IP tunneling connection. More... | |
void | SetTunnelingPortRequestedIndividualAddress (int address) |
Sets the (optional) requested individual address This function is used for KNXnet/IP v2 devices. More... | |
System::Collections::Generic::List< RoutingInfo^> ^ | EnumerateIpRouting () |
void | OpenIpRouting (System::String^ multicastAddress, System::String^ interfaceAddress, bool secured) |
void | OpenIpRouting (bool secured) |
bool | IsRoutingPortSecure () |
Only has works for knxnet ip routing ports, returns if security is enabled or not. More... | |
void | SetRoutingPortBackboneKey (System::String^ key) |
Sets the backbone key for the KNXnet/IP routing connection. More... | |
void | OpenFT12 (System::String^ serialDevice) |
Opens a connection to a KNX FT1.2 serial interface. More... | |
void | OpenTinySerial (System::String^ serialDevice) |
Opens a connection to the KNX Tiny Serial Interface 810. More... | |
void | Close () |
Closes the access port If the access port is not open nothing happens. | |
bool | IsOpen () |
Returns whether the access port is open. More... | |
void | Send (array< unsigned char >^ telegram) |
Sends a KNX Telegram on the Access Port. More... | |
void | GroupValueWrite (int address, array< unsigned char >^ data) |
Sends a GroupValue_Write Telegram. More... | |
void | GroupValueWrite (int address, unsigned char data, int bits) |
Sends a GroupValue_Write Telegram. More... | |
void | GroupValueRead (int address) |
Sends a GroupValue_Read Telegram on the Access Port This function does not wait for a GroupValue_Response telegram. More... | |
void | GroupValueResponse (int address, array< unsigned char >^ data) |
Sends a GroupValue_Response Telegram. More... | |
void | GroupValueResponse (int address, unsigned char data, int bits) |
Sends a GroupValue_Response Telegram. More... | |
array< unsigned char > ^ | ReadGroupObject (int address, int timeout) |
Sends a GroupValue_Read Telegram on the Access Port and waits for a GroupValue_Response indication telegram (with a matching Group Address). More... | |
void | EnableQueue (bool enabled) |
Enables/Disables the receive queue for the access port. More... | |
array< unsigned char > ^ | Receive (int timeout) |
Waits for an inbound KNX telegram. More... | |
int | GetAccessPortIndividualAddress () |
Gets the Individual Address of the Local Device (KNX Interface Device) More... | |
void | SetAccessPortIndividualAddress (int address) |
Sets the Individual Address of the Local Device (KNX Interface Device) More... | |
array< unsigned char > ^ | GetAccessPortRfDomainAddress () |
Gets the Domain Address of the Local Device (KNX Interface Device) More... | |
void | SetAccessPortRfDomainAddress (array< unsigned char >^ domainAddress) |
Sets the Domain Address of the Local Device (KNX Interface Device) More... | |
array< unsigned char > ^ | GetAccessPortSerialNumber () |
Gets the Serial Number of the Local Device (KNX Interface Device) More... | |
void | SetAccessPortSerialNumber (array< unsigned char >^ serialNumber) |
Sets the Serial Number of the Local Device (KNX Interface Device) More... | |
int | GetAccessPortTunnelIndividualAddress () |
Gets the used Individual Address of the tunnel connection (KNX Interface Device). More... | |
void | SetAccessPortTunnelIndividualAddress (int address) |
Sets the used Individual Address of the tunnel connection (KNX Interface Device). More... | |
array< int > ^ | GetAccessPortAdditionalIndividualAddresses () |
Gets the Additional Individual Addresses of the Local Device (KNX Interface Device) More... | |
void | SetAccessPortAdditionalIndividualAddresses (array< int >^ addresses) |
Sets the Additional Individual Addresses of the Local Device (KNX Interface Device) More... | |
int | GetAccessPortMaxApduLength () |
Gets the maximum supported apdu length of the Local Device (KNX Interface Device) | |
void | ConnectPacketTrace () |
Starts the Packet Trace, write Rx and Tx packets to the logger (level: information) | |
void | DisconnectPacketTrace () |
Stops the Packet Trace. | |
delegate void | TelegramEventHandler (Object^ sender, array< unsigned char >^ telegram) |
delegate void | NotificationEventHandler (Object^ sender, AccessPortEvent e) |
Static Public Member Functions | |
static int | GetDestAddress (array< unsigned char >^ telegram) |
Extracts the Destination Address from the Telegram. More... | |
static int | GetSrcAddress (array< unsigned char >^ telegram) |
Extracts the Source Address from the Telegram. More... | |
static int | GetApci (array< unsigned char >^ telegram) |
Extracts the APCI from the Telegram. More... | |
static int | GetMessageCode (array< unsigned char >^ telegram) |
Extracts the Message Code from the Telegram. More... | |
static array< unsigned char > ^ | GetSerialNumber (array< unsigned char >^ telegram) |
Extracts the Serial Number from the Telegram This is extracted from the Additional Info field i.e. More... | |
static bool | IsGroup (array< unsigned char >^ telegram) |
Determines if the specified telegram is a GroupValue telegram This is, one of GroupValue_Read, GroupValue_Write or GroupValue_Response. More... | |
static bool | IsGroupWrite (array< unsigned char >^ telegram) |
Determines if the specified telegram is a GroupValue_Write telegram. More... | |
static bool | IsGroupRead (array< unsigned char >^ telegram) |
Determines if the specified telegram is a GroupValue_Read telegram. More... | |
static bool | IsGroupResponse (array< unsigned char >^ telegram) |
Determines if the specified telegram is a GroupValue_Response telegram. More... | |
static array< unsigned char > ^ | GetGroupData (array< unsigned char >^ telegram) |
Extracts the Group Value data from the KNX telegram. More... | |
Protected Member Functions | |
!AccessPort () | |
Finalizer (non-deterministic destructor) cleans up unmanaged resources. More... | |
Events | |
TelegramEventHandler^ | TelegramEvent |
NotificationEventHandler^ | NotificationEvent |
This is a wrapper around the functions found in kdrive_express_access.h.
Alternative with C# using:
|
inline |
Destructor cleans up unmanaged and managed resources.
|
inlineprotected |
Finalizer (non-deterministic destructor) cleans up unmanaged resources.
(converted into "virtual void Finalize()" by the compiler)
|
inline |
Enables/Disables the receive queue for the access port.
[in] | enabled | true enables the receive queue false disables the queue |
|
inline |
Scans for all KNX IP Routing devices
|
inline |
Scans for all KNX IP Tunneling Interface devices.
|
inline |
Scan for all KNX USB Interface devices.
|
inline |
Gets the Additional Individual Addresses of the Local Device (KNX Interface Device)
|
inline |
Gets the Individual Address of the Local Device (KNX Interface Device)
|
inline |
Gets the Domain Address of the Local Device (KNX Interface Device)
|
inline |
Gets the Serial Number of the Local Device (KNX Interface Device)
|
inline |
Gets the used Individual Address of the tunnel connection (KNX Interface Device).
This address is the device address PID_KNX_INDIVIDUAL_ADDRESS or a additional individual address PID_ADDITIONAL_INDIVIDUAL_ADDRESSES (normal case). The interface communicates it at the connecting procedure. So if somebody changed the additional individual addresses than this value is not up to data!
|
inlinestatic |
Extracts the APCI from the Telegram.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Extracts the Destination Address from the Telegram.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Extracts the Group Value data from the KNX telegram.
If the telegram is not a GroupValue_Write or GroupValue_Response telegram an Invalid Telegram error is returned. The data buffer should be large enough to hold the data from the telegram. This length is checked against the length held in the telegram and if insufficient an Access Port Error is returned (Buffer Overflow).
[in] | telegram | the KNX Telegram (Group Value Telegram) |
|
inlinestatic |
Extracts the Message Code from the Telegram.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Extracts the Serial Number from the Telegram This is extracted from the Additional Info field i.e.
for KNX-RF telegrams
[in] | telegram | the KNX telegram |
|
inlinestatic |
Extracts the Source Address from the Telegram.
[in] | telegram | the KNX telegram |
|
inline |
Gets the security user id for the KNXnet/IP tunneling connection.
|
inline |
Sends a GroupValue_Read Telegram on the Access Port This function does not wait for a GroupValue_Response telegram.
address | is the Group Address (destination) |
|
inline |
Sends a GroupValue_Response Telegram.
[in] | address | is the Group Address (destination) |
[in] | data | is the datapoint value to be sent |
|
inline |
Sends a GroupValue_Response Telegram.
[in] | address | is the Group Address (destination) |
[in] | data | is the datapoint value to be sent |
[in] | bits | represents the length of the datapoint value, in bits |
|
inline |
Sends a GroupValue_Write Telegram.
[in] | address | is the Group Address (destination) |
[in] | data | is the datapoint value to be sent |
|
inline |
Sends a GroupValue_Write Telegram.
[in] | address | is the Group Address (destination) |
[in] | data | is the datapoint value to be sent |
[in] | bits | respresents the length of the datapoint value, in bits |
|
inlinestatic |
Determines if the specified telegram is a GroupValue telegram This is, one of GroupValue_Read, GroupValue_Write or GroupValue_Response.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Determines if the specified telegram is a GroupValue_Read telegram.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Determines if the specified telegram is a GroupValue_Response telegram.
[in] | telegram | the KNX telegram |
|
inlinestatic |
Determines if the specified telegram is a GroupValue_Write telegram.
[in] | telegram | the KNX telegram |
|
inline |
Returns whether the access port is open.
|
inline |
Only has works for knxnet ip routing ports, returns if security is enabled or not.
|
inline |
Opens a connection to a KNX FT1.2 serial interface.
Interfaces which supports this protocol: all KNX conform FT1.2 serial interfaces e.g. Weinzierl KNX Serial BAOS 870 e.g. Weinzierl KNX BAOS Module 820/822/830/838
[in] | serialDevice | is the device where the interface is attached, i.e. COM1 or /dev/ttyS0 etc |
|
inline |
Opens a connection to a KNX IP Tunneling Interface device
[in] | address | The IP Address and (optional) the port which is separated by a colon. When the port is not set then the default port for KNXnet/IP (3671) is used e.g. "192.168.1.47" "192.168.1.47:3671" |
|
inline |
Opens a connection to a KNX IP Tunneling Interface device on a specific network interface
[in] | address | The IP Address and (optional) the port which is separated by a colon. When the port is not set then the default port for KNXnet/IP (3671) is used e.g. "192.168.1.47" "192.168.1.47:3671" |
[in] | interfaceAddress | The Interface Adaptor IP Address |
|
inline |
Creates an KNXnet/IP Routing access port the default KNXnet/IP multicast address (224.0.23.12) and network interface adaptor are used
When is_secure is true then backbone key must set before open.
or via keyring file \sa SetKeyring \note Only available in the Commercial Access kdriveExpress SDK \param [in] secured with (1) or without encrypted communication (0)
|
inline |
Creates an KNXnet/IP Routing access port.
When is_secure is true then backbone key must set before open.
or via keyring file \sa SetKeyring \note Only available in the Commercial Access kdriveExpress SDK \param [in] multicastAddress (optional) The Multicast IP Address When the multicast_address = 0 (null pointer) then the default KNXnet/IP multicast address is used (224.0.23.12) \param [in] interfaceAddress The Interface Adaptor IP Address \param [in] secured with (1) or without encrypted communication (0)
|
inline |
Opens a connection to a KNX IP Tunneling Interface device Default port for KNXnet/IP (3671) is used.
[in] | address | The IP Address |
|
inline |
Opens a connection to a KNX IP Tunneling Interface device on a specific network interface.
[in] | address | The IP Address |
[in] | port | the port When the port is set to 0 then the default port for KNXnet/IP (3671) is used |
[in] | interfaceAddress | The Interface Adaptor IP Address |
|
inline |
Opens a connection to a KNX IP Tunneling Interface device on a specific network interface.
Interfaces which supports this protocol: all KNX conform KNXnet/IP Tunneling interfaces e.g. Weinzierl KNX IP Interface 730/731/732 e.g. Weinzierl KNX IP Interface 740 Wireless e.g. Weinzierl KNX IP Router 750/751/752 e.g. Weinzierl KNX IP LineMaster 760/762 e.g. Weinzierl KNX IP BAOS 770/771/772/773/774/777
When a secure KNX IP Tunneling device is used then password, user id (optional) and authentication code (optional) must set before open.
or via keyring file
[in] | address | The IP Address |
[in] | port | the port When the port is set to 0 then the default port for KNXnet/IP (3671) is used |
[in] | interfaceAddress | The Interface Adaptor IP Address |
|
inline |
Opens a connection to the KNX Tiny Serial Interface 810.
This is a modified TP-UART Protocol without real-time requirements to the host
Interfaces which supports this protocol: Weinzierl KNX Tiny Serial Interface 810
[in] | serialDevice | is the device where the interface is attached, i.e. COM1 or /dev/ttyS0 etc |
|
inline |
Opens a connection to a KNX USB Interface device interfaceIndex should be in the range 0..iface_count-1 where iface_count is > 0.
Interfaces which supports this protocol: all KNX conform USB interfaces e.g. Weinzierl KNX USB Interface 310/311/320/330
interfaceIndex | the interface device enumeration index |
|
inline |
Sends a GroupValue_Read Telegram on the Access Port and waits for a GroupValue_Response indication telegram (with a matching Group Address).
If the response telegram has been received you can use GetGroupData to get the response data. This function waits until either a telegram is received or the timeout elapses. If the timeout elapses a KdriveException will thrown.
[in] | address | is the Group Address (destination) |
[in] | timeout | The time period to wait in milliseconds for the response to arrive |
|
inline |
Waits for an inbound KNX telegram.
This function waits until either a telegram is received or the timeout elapses. If the timeout elapses a KdriveException will thrown.
[in] | timeout | The time period to wait in milliseconds for a telegram to arrive |
|
inline |
Sends a KNX Telegram on the Access Port.
[in] | telegram | is the EMIC encoded KNX Telegram |
|
inline |
Sets the Additional Individual Addresses of the Local Device (KNX Interface Device)
[in] | ap | the access port descriptor of a tunneling access port |
[in] | addresses | the array of additional individual addresses |
|
inline |
Sets the Individual Address of the Local Device (KNX Interface Device)
address | the individual address of the local device |
|
inline |
Sets the Domain Address of the Local Device (KNX Interface Device)
[in] | domainAddress | the new domain address of the local device |
|
inline |
Sets the Serial Number of the Local Device (KNX Interface Device)
[in] | serialNumber | the new serial number of the local device |
|
inline |
Sets the used Individual Address of the tunnel connection (KNX Interface Device).
Returns an error, if it can not changed because for the tunnel address is the device individual address used.
[in] | address | the individual address of the tunnel |
|
inline |
Sets the used knx keyring project.
Use 0 when you want remove it
|
inline |
Sets the backbone key for the KNXnet/IP routing connection.
[in] | key | the backbone key of the local device as hex string |
|
inline |
Sets the optional authentication code for the KNXnet/IP tunneling connection.
This function is used for secure KNXnet/IP devices. Call this before open the connection. The default value is a empty string.
[in] | authenticationCode | the authentication code of the local device |
|
inline |
Sets the user id and the security password for the KNXnet/IP tunneling connection.
This function is used for secure KNXnet/IP devices. Call this before open the connection.
[in] | userId | the security user id of the local device |
[in] | password | the security password of the local device |
|
inline |
Sets the (optional) requested individual address This function is used for KNXnet/IP v2 devices.
The default value is 0 ( = considered any). Call this before open the connection.
[in] | password | the security password of the local device |
|
inline |
Sets the security user id for the KNXnet/IP tunneling connection.
This function is used for secure KNXnet/IP devices. Call this before opening the connection. The default value is 1.
[in] | userId | the security user id of the local device |