资源简介
电力系统104规约。
C语言实现的104规约源代码, 是实现规约的核心代码文件,不是整个工程文件。
代码片段和文件信息
/*
Modify Record
2002-11-16 Add Network Card Value Geting From nsc200.ini
2002-12-26 According Neddadding Send chang yc
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “wdLib.h“
#include “in.h“
#include “ioLib.h“
#include “constant.h“
#include “NsDatabase.h“
#include “NsExtTime.h“
#include “NsIoFunction.h“
#include “NsCommon.h“
#include “NsReadOnly.h“
#include “ExtDatabase.h“
#include “Project/NsIec104.h“
static NS_IEC104_MAIN NsIec104Struct;
void NsNetServerProcess(void);
static void NsIec104Process(void);
static void NsIec104Init(unsigned char Cardshort Port);
static void NsIec104NetInit(void);
static void NsIec104Reset(void);
static void NsIec104ProcessFormatI(void);
static void NsIec104ProcessFormatS(void);
static void NsIec104ProcessFormatU(void);
static void NsIec104Interrogation(void);
static void NsIec104InterrogationGroup(void);
static void NsIec104InterrogationAll(void);
static void NsIec104ProcessYxGroup(unsigned char Group);
static void NsIec104ProcessYcGroup(unsigned char Group);
static void NsIec104ProcessCellGroup(unsigned char Group);
static void NsIec104ProcessTime(void);
static void NsIec104ProcessYkYt(void);
static void NsIec104ProcessPulse(void);
static void NsIec104DefaultGroup(unsigned char Group);
static void NsIec104ProcessPulseData(void);
static void NsIec104SendGroup(void);
static void NsIec104SendYkMessage(short Whounsigned char Action);
static void NsIec104ReceiveYkReturn(void);
static void NsIec104SendYkSelectConfirm(void);
static void NsIec104SendYkExeConfirm(void);
static void NsIec104SendYkEscConfirm(void);
static unsigned char NsIec104SendCosSoe(void);
static void NsIec104InitYk(void);
static void NsIec104CycleCount(void);
static void NsIec104SendChangeYc(void);
/*
static void Iec104testCosSoe(void);
void debug104(void);
*/
static void NsIec104Init(unsigned char Cardshort Port)
{
unsigned short i;
int Result;
char Buff[32];
char Ip0Buff[64]Ip0Route[64];
char Ip1Buff[64]Ip1Route[64];
NS_SYSTEM_DATA_MODE SysData;
NsIec104Struct.linkState=NS_DISCONNECTED;
NsIec104Struct.NsNewSocketId=0;
getforsecond(&NsIec104Struct.linkValidTime);
NsIec104Struct.ReceiveIndex=0;
NsIec104Struct.ReceiveIndexLength=0;
NsIec104Struct.SendMeNumber=0;
NsIec104Struct.HasSendNumber=0;
NsIec104Struct.NeedSendNumber=0;
NsIec104Struct.LeftSendNumber=0;
NsIec104Struct.Card=Card;
NsIec104Struct.Port=Port;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5908 2003-09-05 12:51 实现104规约源代码\NsIec104.h
文件 93778 2003-09-05 14:20 实现104规约源代码\NsIec104Server.c
目录 0 2015-08-05 15:25 实现104规约源代码
----------- --------- ---------- ----- ----
99686 3
- 上一篇:mini2440开发板上的录音程序
- 下一篇:OPC开发头文件
评论
共有 条评论