ADLINK Technology PCIe-GIE7 Series Reference Manual

ADLINK Technology PCIe-GIE7 Series Reference Manual

Function library reference
Hide thumbs Also See for PCIe-GIE7 Series:

Advertisement

Quick Links

PCIe-GIE7x Series
Function Library Reference
Manual Rev.:
Revision Date:
Part No:
Leading EDGE COMPUTING
1.0
July 14, 2017
50-11178-2000

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PCIe-GIE7 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ADLINK Technology PCIe-GIE7 Series

  • Page 1 PCIe-GIE7x Series Function Library Reference Manual Rev.: Revision Date: July 14, 2017 Part No: 50-11178-2000 Leading EDGE COMPUTING...
  • Page 2 Leading EDGE COMPUTING Revision History Revision Release Date Description of Change(s) 2.00 July 14, 2017 Initial Release...
  • Page 3: Preface

    PCIe-GIE7x Preface Copyright 2017 ADLINK Technology, Inc. This document contains proprietary information protected by copy- right. All rights are reserved. No part of this manual may be repro- duced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.
  • Page 4 Leading EDGE COMPUTING Conventions Take note of the following conventions used throughout this manual to make sure that users perform certain tasks and instructions properly. Additional information, aids, and tips that help users perform tasks. NOTE: NOTE: Information to prevent minor physical injury, component dam- age, data loss, and/or program corruption when trying to com- plete a task.
  • Page 5: Table Of Contents

    PCIe-GIE7x Table of Contents Revision History..............ii Preface ..................iii 1 Introduction ................ 1 Setting Up the Build Environment........1 2 Function Library ..............3 List of Functions..............3 Function Library ..............4 2.2.1 Device Control Functions ........... 4 2.2.2 Power Management Functions........
  • Page 6 Leading EDGE COMPUTING This page intentionally left blank. Table of Contents...
  • Page 7: Introduction

    PCIe-GIE7x Introduction The PCIe-GIE7X Function Library Reference provides necessary API details, where functions can develop power management, Trigger over Ethernet, and License Management applications in C/ C++, C#/VB.Net. Once the driver is installed, the PCIe-GIE7X is listed in the ADLINK Smart GigE Utility, as shown. 1.1 Setting Up the Build Environment All files are located in the directory \ADLINK\PCIe-GIE7X\Include File Type File...
  • Page 8 Leading EDGE COMPUTING File Type File Description Required by Exports API function All C/C++ Library SmartPoE.lib definitions, required for all applications Visual C/C++ applications using APIs Introduction...
  • Page 9: Function Library

    PCIe-GIE7x Function Library 2.1 List of Functions Category Function Cards SmartPoE_Register_Card PCIe-GIE64, SmartPoE_Release_Card PCIe-GIE7X Device SmartPoE_Get_ID Control SmartPoE_Get_CPLDVersion PCIe-GIE7X SmartPoE_Get_MCUVersion SmartPoE_Power_Enable SmartPoE_Get_Power_Enable SmartPoE_Get_PoEstate SmartPoE_Get_PoEPortLaststate SmartPoE_Get_Temperature SmartPoE_Get_HighTemperature SmartPoE_Get_LowTemperature SmartPoE_Set_HighTemperature Power PCIe-GIE64, Management PCIe-GIE7X SmartPoE_Set_LowTemperature SmartPoE_Get_PortStatus SmartPoE_Get_PSEPortCurrent SmartPoE_Get_PSEPortVoltage SmartPoE_Get_PoEConsPowbudget SmartPoE_Get_PoELeftPowbudget SmartPoE_Get_PowerBudgetControl SmartPoE_Set_PowerBudgetControl AD_InstallSecret AD_SetMasterSecret AD_EncryptReadSegment...
  • Page 10: Function Library

    Leading EDGE COMPUTING Category Function Cards GIE_Set_ActionCommand GIE_Get_ActionCommand GIE_Send_ActionCommand GIE_Send_AllActionCommand GIE_GetTriggerSource GIE_SetTriggerSource GIE_GetTriggerMode GIE_SetTriggerMode Trigger over PCIe-GIE7X PRO Ethernet GIE_GetTriggerActivation GIE_SetTriggerActivation GIE_GetTriggerType GIE_SetTriggerType GIE_GetTriggerDebounce GIE_SetTriggerDebounce GIE_GetTriggerCount GIE_ResetTriggerCount 2.2 Function Library 2.2.1 Device Control Functions SmartPoE_Register_Card Initializes a specified device, should be called before other functions except those with no Number parameter.
  • Page 11 PCIe-GIE7x Return Code No error occurs if return value >= 0, and if negative value, as follows The count of calling SmartPoE_Register_Card need to be less than 32 Driver is not found or there is no card exists SmartPoE_Release_Card Closes the device and releases all allocated resources, should be called before terminating the application.
  • Page 12 Leading EDGE COMPUTING cations, the base address (pass-through address) and IRQ level are assigned directly by the system BIOS Syntax C/C++ short SmartPoE_Get_ID (unsigned short wCard- Number, unsigned short *wID) Parameter(s) wCardNumber: Acquired from the return value of SmartPoE_Register_Card wID: Indicates card ID set by S1 switch, a value from 0 to 15.
  • Page 13 PCIe-GIE7x Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_CPLDVersion Retrieves CPLD version. Syntax C/C++ short SmartPoE_Get_CPLDVersion(unsigned short wCardNumber, unsigned...
  • Page 14: Power Management Functions

    Leading EDGE COMPUTING SmartPoE_Get_MCUVersion Retrieves the PoE MCU version. Syntax C/C++ short SmartPoE_Get_MCUVersion (unsigned short wCardNumber, unsigned short wVersion) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. wVersion: Bit 0 to 3: minor number Bit 4 to 7: major number For example V1.3 Bit 0 to 3: minor number, in this case 3 Bit 4 to 7: major number, in this case 1 Return Code...
  • Page 15 PCIe-GIE7x short wEnPort2, unsigned short wEnPort3, unsigned short wEnPort4) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. wEnPort1, wEnPort2, wEnPort3, wEnPort4: Indicates power mode of the Smart PoE port with: 0: power off 1: auto mode (enables port line detection) Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter,...
  • Page 16 Leading EDGE COMPUTING 1: auto mode (enables port line detection) Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_PoEstate Retrieves PoE state.
  • Page 17 PCIe-GIE7x 11: power budget = 61.6W bPoEstatePA4: (PA4) 0: 52V off, PoE-PSE is down 1: 52V on, PoE-PSE is on bPoEstatePA3: (PA3) INT state of thermal sensor (Low Active) 0: over temperature interrupt arise 1: no interrupt bPoEstatePF0: (PF0) Port numbers 0: 4 PoE ports 1: 2 PoE ports (port 1 and port 2) Return Code...
  • Page 18 Leading EDGE COMPUTING 0 : port 1 power not enabled 1 : port 1 power enabled Bit 1: 0 : port 2 power not enabled 1 : port 2 power enabled Bit 2: (if there are only 2 POE ports, this bit is always 0) 0 : port 3 power not enabled 1 : port 3 power enabled Bit 3: (if there are only 2 POE ports, this bit is always 0)
  • Page 19 PCIe-GIE7x Thermal temperature in °C. Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion SmartPoE_Get_HighTemperature Retrieves the High Temperature setting.
  • Page 20 Leading EDGE COMPUTING SmartPoE_Get_LowTemperature Retrieves Low Temperature setting (cannot exceed High Temperature setting). Syntax C/C++ short SmartPoE_Get_LowTemperature (unsigned short wCardNumber, unsigned short * wLowTem- perature) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. wLowTemperature: Low Temperature setting (cannot exceed High Temperature setting Return Code No error occurs if return value >= 0, and if negative value, as...
  • Page 21 PCIe-GIE7x Retrieved from return value SmartPoE_Register_Card. wHighTemperature: High Temperature setting, more than or equal to 80°C, not exceeding 130°C, and at least 10°C higher than the Low Temperature setting. 1 byte data in 1°C unit. Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 22 Leading EDGE COMPUTING Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion The input argument(s) exceed the allowed range.
  • Page 23 PCIe-GIE7x 2:Class 2 3:Class 3 4:Class 4 5:Class 5 6:Class 0 7:Current limit bstateClass PoE CLASS Unknown Current limit bstatePowerGood: 1: PowerGood Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion...
  • Page 24 Leading EDGE COMPUTING short SmartPoE_Get_PSEPortCurrent(unsigned short wCardNumber, unsigned short PortNumber double *wCurrent) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. PortNumber: Indicates port number from 1 to 4. wCurrent: Port current Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 25 PCIe-GIE7x wVoltage: Port voltage Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion SmartPoE_Get_PoEConsPowbudget Retrieves the Consumed Power budget. Syntax C/C++ short...
  • Page 26 Leading EDGE COMPUTING Syntax C/C++ short SmartPoE_Get_POELeftPowbudget(unsigned short wCardNumber, double * wPower) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. wPower: Left Power budget in W. Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 27 PCIe-GIE7x Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion SmartPoE_Set_PowerBudgetControl Sets power budget control status. Syntax C/C++ short SmartPoE_Set_PowerBudgetControl(unsigned...
  • Page 28: License Management Functions

    Leading EDGE COMPUTING 2.2.3 License Management Functions AD_InstallSecret Installs secret on DS28C22, and can, optionally, lock the secret (irreversible). Syntax C/C++ short AD_InstallSecret(unsigned short wCard- Number, unsigned char *MasterSecret, bool lockbit) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. MasterSecret: 32 byte buffer with new secret (or partial). LockBit: Allows secret to be write-protected, where it is read as pro- tected by hardware design.
  • Page 29 PCIe-GIE7x Syntax C/C++ short AD_SetMasterSecret(unsigned short wCard- Number, unsigned char *MasterSecret) Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. MasterSecret: 32 byte buffer with new secret (or partial). Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 30 Leading EDGE COMPUTING data: Buffer for data to read (32-byte) romid: Buffer containing device 8-byte ROM ID used in encryption. manid: Buffer for 2-byte manufacturer ID used in encryption calcu- lation read_mac: Buffer containing 32 bytes of read_mac read_challenge: Buffer containing 8 bytes of challenge Return Code No error occurs if return value >= 0, and if negative value, as follows...
  • Page 31 PCIe-GIE7x Retrieved from return value SmartPoE_Register_Card. numBytesTot: Total bytes to be written to page. enc_data: Buffer containing 32 bytes of data to be written old_data: Buffer containing 32 bytes of data currently in that segment (required for authentication calc.) romid: Buffer containing device 8-byte ROM ID used in encryption.
  • Page 32 Leading EDGE COMPUTING AD_EncryptAuthWritePageEnc Writes up to 32 bytes in WHOLE block segment(s) to EEPROM on provided page using authenticated encryption. Syntax C/C++ short AD_EncryptAuthWritePageEnc(unsigned short wCardNumber, unsigned short numBytesTot, unsigned char *enc_data, unsigned char *old_data, unsigned char *romid, unsigned char *manid, unsigned char *chk_mac, unsigned char *challenge, bool lockdata) Parameter(s)
  • Page 33 PCIe-GIE7x lockdata: Once set, data protection mode cannot be reset. Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion An error in lock function.
  • Page 34: Trigger Over Ethernet Functions

    Leading EDGE COMPUTING Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card SmartPoE_Get_MCUVersion 2.2.4 Trigger over Ethernet Functions GIE_Set_ActionCommand Sets an ACTION command over the selected port.
  • Page 35 PCIe-GIE7x An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card. An invalid IP address. GIE_Get_ActionCommand Gets an ACTION command over the selected port. Syntax C/C++ short GIE_Get_ActionCommand(U16 wCardNumber, PortNumber, *gActionDeviceKey, *gActionGroupKey, U32 *gActionGroupMask); Parameter(s) wCardNumber: Retrieved...
  • Page 36 Leading EDGE COMPUTING GIE_Send_ActionCommand Sends a software ACTION command over the selected port. Syntax C/C++ short GIE_Send_SoftwareActionCommand(U16 wCardNumber, U16 PortNumber); Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. PortNumber: Indicates port number from 1 to 4. Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 37 PCIe-GIE7x Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card. GIE_GetTriggerSource Acquires Trigger over Ethernet function source. Syntax C/C++ short...
  • Page 38 Leading EDGE COMPUTING short GIE_SetTriggerSource(U16 wCardNumber, U16 Source);; Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. State: 0: Software trigger source 1: External hardware trigger source Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 39 PCIe-GIE7x Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card. -11) An invalid state parameter. GIE_SetTriggerMode Acquires Trigger over Ethernet function status.
  • Page 40 Leading EDGE COMPUTING GIE_GetTriggerActivation Acquires Trigger activation mode of ToE, specifying that the source trigger is considered valid on the rising edge or fall- ing edge. Syntax C/C++ short GIE_GetTriggerActivation (U16 wCardNum- ber, U16 *Activation);; Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card.
  • Page 41 PCIe-GIE7x Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. Activation: 1: Rising edge 2: Falling edge Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card.
  • Page 42 Leading EDGE COMPUTING Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card. GIE_SetTriggerType Sets Trigger type, where 4 to 4 mode indicates that each pin of the DI performs corresponding port action command to active, and 1 to 4 mode indicates that DI_0 performs all port action commands to active.
  • Page 43 PCIe-GIE7x GIE_GetTriggerDebounce Acquires Trigger debounce time for filtering the external trig- ger. Syntax C/C++ short GIE_GetTriggerDebounce (U16 wCardNumber, U32 * Debounce);; Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. Debounce: 1µs to 200000µs Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 44 Leading EDGE COMPUTING short GIE_SetTriggerDebounce (U16 wCardNumber, U32 Debounce);; Parameter(s) wCardNumber: Retrieved from return value SmartPoE_Register_Card. Debounce: 1µs to 200000µs Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32 The function is not supported by this card.
  • Page 45 PCIe-GIE7x Number of triggers from hardware trigger or software trigger (Valid value: 0 to 65535) TriggerSentCount: Number of action commands from PCIe-GIE7x PRO (Valid value: 0 to 65535) Return Code No error occurs if return value >= 0, and if negative value, as follows An invalid wCardNumber parameter, wCardNumber is less than 32...
  • Page 46 Leading EDGE COMPUTING Function Library...
  • Page 47: Important Safety Instructions

    PCIe-GIE7x Important Safety Instructions For user safety, please read and follow all instructions, Warnings, Cautions, and Notes marked in this manual and on the associated device before handling/operating the device, to avoid injury or damage. S'il vous plaît prêter attention stricte à tous les avertissements et mises en garde figurant sur l'appareil , pour éviter des blessures ou des dommages.
  • Page 48 Leading EDGE COMPUTING  Never attempt to repair the device, which should only be serviced by qualified technical personnel using suitable tools  A Lithium-type battery may be provided for uninterrupted backup or emergency power. Risk of explosion if battery is replaced with one of an incorrect type;...
  • Page 49 PCIe-GIE7x BURN HAZARD Touching this surface could result in bodily injury. To reduce risk, allow the surface to cool before touching. RISQUE DE BRÛLURES Ne touchez pas cette surface, cela pourrait entraîner des blessures. Pour éviter tout danger, laissez la surface refroidir avant de la toucher.
  • Page 50 Leading EDGE COMPUTING This page intentionally left blank. Important Safety Instructions...
  • Page 51: Getting Service

    San Jose, CA 95138, USA Tel: +1-408-360-0200 Toll Free: +1-800-966-5200 (USA only) Fax: +1-408-360-0222 Email: info@adlinktech.com ADLINK Technology (China) Co., Ltd. 300 Fang Chun Rd., Zhangjiang Hi-Tech Park Pudong New Area, Shanghai, 201203 China Tel: +86-21-5132-8988 Fax: +86-21-5132-3588 Email: market@adlinktech.com...

Table of Contents