You are on page 1of 9

Doc No.

iRay Technology (Shanghai) Ltd. Version A0


Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 1

IrDA SDK Programming Guide

3.0.0.16

Authors : Wenhong.Shen

Doc. No. :
Date : 2015-9-15

Version : A0

Status : Release

Project : N/A

1
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 2

Author Wenhong.Shen Inspector Haitao.Ning

Approver Zhiqiang.Fang
Review Record
Department Participant Department Participant
Marketing Quality
Manufactory Financial

R&D Pre-production

Delivery Department

Department Department Department Department Department Others


R&D

Revision History

Version Revised by Checked by Approved by Description of changes


A0 Wenhong.Shen Haitao.Ning Zhiqiang.Fang First edition released

2
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 3

Content
1. Introduction ............................................................................................................................................. 4
2. Software Release Package ..................................................................................................................... 4
3. Development guide ................................................................................................................................. 5
3.1 Visual Studio Project Setting........................................................................................................... 5
4. IrDA API.................................................................................................................................................... 5
4.1 Function Descriptions....................................................................................................................... 5
4.2 Structure Description ....................................................................................................................... 7

3
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 4

1. Introduction
iRay Technology FPD (Flat panel detector) SDK is a software components based on
Windows Dynamic Library technology, providing an interface for upper layer DR software
integration purpose.
SDK is developed and deployed on Windows Operation System, it can run on Windows
XP/Windows 7/Windows 8, and requires computer memory 2 GB minimum.
This documentation will focus on the application programming interface of the IrDA SDK
package.

2. Software Release Package


The software release package is composed of three parts, there are Tools, Dev and Help.
Tools package contains the executable files. Dev package contains the header files, library files
and DLL files for integration programming usage. And Help package contains Doc and
Example files. Doc package contains IrDA SDK programming Guide, Examples packages is
contanis user interface source code written in C++ and some other demonstration purpose
program.

4
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 5

3. Development guide
Here is the introduction for using SDK in Visual Studio 2013. The DLL is provided with
C style programming interfaces. So it is compatible with other programming languages, User
can integrate SDK in their software system with other programming languages in
corresponding IDE (Integrated development environment) by invoking the functions
dynamically, for instance VB/Delphi/.Net etc.

3.1 Visual Studio Project Setting


FpdIrDARegister.lib and corresponding header files should be include within VC project,
here shows the procedure of how to do the project setting:
Right click on the project in the solution window, Select the “Property” context menu item
and a dialog will be popped up, Set include path at category “C/C++  General  Additional
Include Directories”, Set lib dependency path at category “Linker  General  Additional
Library Directories”, Add “FpdIrDARegister.lib” to lib dependency at “Linker  Input 
Additional Dependencies”.

4. IrDA API
4.1 Function Descriptions

1 FPD_IrDAGetLastError
Function const char* FPD_IrDAGetLastError();
Description The function use to get last error description from IRDA SDK.
Parameters -
Return Value Error description string.
Return Status -
Timeout -
2 FPD_IrDAGetDeviceName
Function const char* FPD_IrDAGetDeviceName();
Description The function use to get remote IRDA device name.
Parameters -
Return Value Remote device name string.
Return Status -

5
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 6

Timeout -
3 FPD_IrDAGetWiFiMode
Function IR_LIB_RESULT FPD_IrDAGetWiFiMode(IrNetworkParam
&workParam);
Description The function use to get IRDA working parameter.
Parameters workParam: Structure of config parameter.
Return Value IR_RESULT_SUCCESS,
IR_RESULT_FAILED,
Return Status -
Timeout -
4 FPD_IrDASetWiFiMode
Function FPD_IR_API IR_LIB_RESULT
FPD_IrDASetWiFiMode(IrNetworkParam workParam);
Description The function use to set IRDA working parameter.
Parameters workParam: Structure of config parameter.
Return Value IR_RESULT_SUCCESS,
IR_RESULT_FAILED,
Return Status -
Timeout -
5 FPD_IrDAStart
Function IR_LIB_RESULT FPD_IrDAStart(IrDACallback pIrCallback);
Description The function use to begin IRDA port listening.
Parameters pIrCallback: Running status callback
Return Value IR_RESULT_SUCCESS,
IR_RESULT_FAILED,
Return Status IR_INFO_OCCUR_ERROR,
IR_INFO_FIND_DEVICE,
IR_INFO_FINISH_REGIST,
Timeout -
6 FPD_IrDAStop
Function IR_LIB_RESULT FPD_IrDAStop();
Description The function use to close IRDA function.
Parameters -
Return Value IR_RESULT_SUCCESS,
IR_RESULT_FAILED,
Return Status -
Timeout -
7 FPD_IrDAGetWorkMode
Function FPD_IR_API IR_LIB_RESULT
FPD_IrDAGetWorkMode(IrWorkModeParam &workMode);
Description The function use to getting IRDA SDK workmode.
Parameters workMode: Structure of workmode setting.

6
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 7

Return Value IR_RESULT_SUCCESS,


Return Status -
Timeout -
8 FPD_IrDASetWorkMode
Function FPD_IR_API IR_LIB_RESULT
FPD_IrDASetWorkMode(IrWorkModeParam workMode);
Description The function use to setting IRDA SDK workmode.
Parameters workMode: Structure of workmode setting.
Return Value IR_RESULT_SUCCESS,
Return Status -
Timeout -
9 FPD_IrDAUpdateOnce
Function FPD_IR_API IR_LIB_RESULT
FPD_IrDAUpdateOnce(int updateMode);
Description The function use to comfirm once IRDA write configuration.
Parameters updateMode: enum of update mode.
Return Value IR_RESULT_SUCCESS,
Return Status -
Timeout -

4.2 Structure Description

enum IR_CALLBACK_INFO
{
IR_INFO_OCCUR_ERROR,
IR_INFO_FIND_DEVICE,
IR_INFO_FINISH_REGIST,
IR_INFO_GET_CONFIG,
};

enum IR_LIB_RESULT
{
IR_RESULT_SUCCESS,
IR_RESULT_FAILED,
};

enum IR_WORK_MODE
{
IR_WRITE_ALWAYS = 0x01,
IR_WRITE_COMFIRM_BY_USER = 0x02,
IR_READ = 0x10,

7
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 8

};

enum IR_UPDATE_MODE
{
IR_UPDATE_NONE,
IR_UPDATE_WIFI,
IR_UPDATE_IP,
};

enum IR_GET_INFO
{
IR_GET_NONE,
IR_GET_WIFI_PARAM = 0x01,
IR_GET_FPD_PARAM = 0x02,
};

#pragma pack(push, 1)
struct IrNetworkParam
{
int APModeEn;
struct CLIENT
{
char SSID[32];
char Key[32];
}Client;
struct AP
{
char SSID[32];
char Key[32];
char CountryCode[2];
int FrequencySel;
int BandWidthSel;
int ChannelSel;
int SecuritySel;
int DHCPServerEn; // Reserved
}Ap;
char WorkIP[32];
char FpdInfo[32];
};
#pragma pack(pop)

#pragma pack(push, 1)
struct IrWorkModeParam

8
Doc No.
iRay Technology (Shanghai) Ltd. Version A0
Date 2015-9-15
IrDA SDK Programming Guide 3.0.0.16 EN
Page 9

{
int IrWorkMode;
int IrWaitingComfirmTimeout;
int IrUpdateMode;
};
#pragma pack(pop)

typedef int (CALLBACK* IrDACallback)(IR_CALLBACK_INFO, int, int, void*);

You might also like