/** * @file KglInterface.h * * Copyright (c) 2019 Keyence Corporation. * All rights reserved. * */ #pragma once #include #include #include #include #include namespace Keyence { class KglDeviceInfo; //------------------------------------------------------------------------- namespace Impl { class KglSystemImpl; class KglInterfaceImpl; }; //------------------------------------------------------------ /** * \~English @brief Represents an interface (network adapter). * \~Japanese @brief インターフェイス(ネットワークアダプタ)を表します。 */ class KGLLIB_API KglInterface { public: //------------------------------------------------------------------------- friend class Keyence::Impl::KglSystemImpl; //------------------------------------------------------------ /** * \~English @brief Constructor. * \~Japanese @brief コンストラクタ。 */ KglInterface(uint32_t idx, const Impl::KglSystemImpl& system); //------------------------------------------------------------ /** * \~English @brief Destructor. * \~Japanese @brief デストラクタ。 */ ~KglInterface(); //------------------------------------------------------------ /** * \~English @brief Returns the type of the interface. * Returns USB, Network, or other as the type of the interface for connecting to the camera. * USB is not supported. * \~Japanese @brief インターフェースの種別を返します。 * カメラと接続するためのインターフェースがUSB/Network/それ以外かを返します。 * なお、USBは未サポートです。 * \~English @retval KGL_INTERFACE_NETWORK Network interface. * \~Japanese @retval KGL_INTERFACE_NETWORK Networkのインターフェース。 * \~English @retval KGL_INTERFACE_UNKNOWN Unknown interface. * \~Japanese @retval KGL_INTERFACE_UNKNOWN 不明なインターフェース。 */ KglInterfaceType getType() const; //------------------------------------------------------------ /** * \~English @brief Retrieves the name of the interface. * \~Japanese @brief インターフェースの名称を取得します。 * \~English @return Name of the interface. * Returns a null character if not available. * \~Japanese @return インターフェースの名称。 * 取得できない場合は空文字を返します。 */ KglString getName() const; //------------------------------------------------------------ /** * \~English @brief Retrieve the description of the interface. * \~Japanese @brief インターフェースの説明を取得します。 * \~English @return Description of the interface. * Returns a null character if not available. * \~Japanese @return インターフェースの説明。 * 取得できない場合は空文字を返します。 */ KglString getDescription() const; //------------------------------------------------------------ /** * \~English @brief Retrieves the MAC address. * \~Japanese @brief MACアドレスを取得します。 * \~English @return MAC address. * Returns a null character if not available. * \~Japanese @return MACアドレス。 * 取得できない場合は空文字を返します。 */ KglString getMACAddress() const; //------------------------------------------------------------ /** * \~English @brief Retrieves the number of IP addresses. * \~Japanese @brief IPアドレスの件数を取得します。 * \~English @return Number of IP addresses. * \~Japanese @return IPアドレスの件数。 */ uint32_t getIPAddressCount() const; //------------------------------------------------------------ /** * \~English @brief Retrieves the IP address. * \~Japanese @brief IPアドレスを取得します。 * \~English @param [in] idx IP address number (0 <= idx < KglInterface::getIPAddressCount()) * \~Japanese @param [in] idx IPアドレス番号(0 <= idx < KglInterface::getIPAddressCount()) * \~English @return IP address. * Returns a null character if not available. * \~Japanese @return IPアドレス。 * 取得できない場合は空文字を返します。 */ KglString getIPAddress(uint32_t idx) const; //------------------------------------------------------------ /** * \~English @brief Retrieves the number of subnet masks. * \~Japanese @brief サブネットマスクの件数を取得します。 * \~English @return Number of subnet masks. * \~Japanese @return サブネットマスクの件数。 */ uint32_t getSubnetMaskCount() const; //------------------------------------------------------------ /** * \~English @brief Retrieves the subnet mask. * \~Japanese @brief サブネットマスクを取得します。 * \~English @param [in] idx Subnet mask number (0 <= idx < KglInterface::getSubnetMaskCount() ) * \~Japanese @param [in] idx サブネットマスク番号(0 <= idx < KglInterface::getSubnetMaskCount() ) * \~English @return Subnet mask. * Returns a null character if not available. * \~Japanese @return サブネットマスク。 * 取得できない場合は空文字を返します。 */ KglString getSubnetMask(uint32_t idx) const; //------------------------------------------------------------ /** * \~English @brief Retrieves the default gateway. * \~Japanese @brief デフォルトゲートウェイを取得します。 * \~English @return Default gateway. * Returns a null character if not available. * \~Japanese @return デフォルトゲートウェイ。 * 取得できない場合は空文字を返します。 */ KglString getDefaultGateway() const; //------------------------------------------------------------ /** * \~English @brief Returns the number of the cameras connected to the interface. * \~Japanese @brief インターフェースに接続されているカメラの数を返します。 * \~English @return Number of cameras. * \~Japanese @return カメラの数。 */ uint32_t getDeviceCount() const; //------------------------------------------------------------ /** * \~English @brief Returns the information on the connected cameras. * \~Japanese @brief 接続されているカメラの情報を返します。 * \~English @param [in] idx Index (0 <= idx <= KglInterface::getDeviceCount() ) * \~Japanese @param [in] idx インデックス(0 <= idx <= KglInterface::getDeviceCount() ) * \~English @return Pointer to the KglDeviceInfo object. * Returns NULL if the index is out of range. * \~Japanese @return KglDeviceInfoオブジェクトへのポインタ。 * もしインデックスが範囲外の場合はNULLを返します。 */ const KglDeviceInfo* getDeviceInfo(uint32_t idx) const; //------------------------------------------------------------ /** * \~English @brief Returns a string that uniquely identifies the interface. * \~Japanese @brief インターフェースを一意に識別する文字列を取得します。 * \~English @return String that uniquely identifies the interface. * Returns a null character if not available. * \~Japanese @return インターフェースを一意に識別する文字列。 * 取得できない場合は空文字を返します。 */ KglString getUniqueID() const; //------------------------------------------------------------ /** * \~English @brief Returns whether the filter driver is installed. * \~Japanese @brief フィルタードライバがインストールされているかどうかを返します。 * \~English @retval true The filter driver is installed for the interface. * \~Japanese @retval true インターフェースにフィルタードライバがインストールされています。 * \~English @retval false The filter driver is not installed for the interface. * \~Japanese @retval false インターフェースにフィルタードライバがインストールされていませんでした。 */ bool isFilterDriverInstalled() const; private: //------------------------------------------------------------------------- KglInterface(); KglInterface(const KglInterface&); KglInterface& operator=(const KglInterface&); private: Impl::KglInterfaceImpl* _pImpl; }; }; //end of namespace Keyence