📄 icapi.h
字号:
icGMTBasedSType TimeStamp; icGMTBasedSType StartDateTime; icGMTBasedSType EndDateTime; /* ??? DateAndTime type not defined in Version 1996-08 */ icTimeIntervalMType Duration; icBoolean ProvidingReserve; icReportStatType ReportStatus; icUChar Impact; icPriceType PriceImpact; icTypeRampRates RampStatus; icTypeUnitCapacity CapacityImpact; icTypeAvailabilityClass Availability; icChar Comment[MAX_COMMENT_LEN_1+1]; } icTypeAvailable;#define IC_TYPE_UNAVAIL_NAME "UnAvailable"#define IC_TYPE_UNAVAIL_TDL \ "{(AvailabilityReferenceId)Long,(PlantId)Long,(UnitId)Long,(TimeStamp)Long,(StartDateTime)Long,(EndDateTime)Long,(Duration)Short,(ProvidingReserve)Bool,(ReportStatus)Long,(AvailReasonCode)Long,(Comment)Vstring255}"typedef struct _ictypeunavailable{ icReferenceNumType AvailabilityRefId; icPlantIdType PlantId; icUnitIdType UnitId; icGMTBasedSType TimeStamp; icGMTBasedSType StartDateTime; icGMTBasedSType EndDateTime; /* ??? DateAndTime type not defined in Version 1996-08 */ icTimeIntervalMType Duration; icBoolean ProvidingReserve; icReportStatType ReportStatus; icAvailReasonCodeType AvailReasonCode; icChar Comment[MAX_COMMENT_LEN_1+1]; } icTypeUnAvailable;/* * Real Time Status Type Descriptions */#define IC_TYPE_STAT_AVAIL_NAME "StatusAvailable"#define IC_TYPE_STAT_AVAIL_TDL \ "{Long,Long,Long,Long,{Float,Float},{Bstring2,Float,Float,Float,Float},{Bstring8,Long,Long},Bool}"/* probabily will be too long "{(AvailabilityReferenceId)Long,(PlantId)Long,(UnitId)Long,(TimeStamp)Long,(RampStatus)Float,(CapacityStatus){(CapacityClass)Bstring1,(GrossMaxCapacity)Float,(GrossMinCapacity)Float,(NetMaxCapacity)Float,(NetMinCapacity)Float},(AvailabilityStatus){(AvailFlags)Bstring8,(TimeToOnline)Long,(ReasonForNoLFC)Long},(ProvidingReserve)Bool}" */typedef struct _ictypestatusavailable{ icReferenceNumType AvailabilityRefId; icPlantIdType PlantId; icUnitIdType UnitId; icGMTBasedSType TimeStamp; icTypeRampRates RampStatus; icTypeUnitCapacity CapacityStatus; icTypeAvailabilityClass AvailabilityStatus; icBoolean ProvidingReserve; } icTypeStatusAvailable;#define IC_TYPE_STAT_UN_AVAIL_NAME "StatusUnAvailable"#define IC_TYPE_STAT_UN_AVAIL_TDL \ "{(AvailabilityReferenceId)Long,(PlantId)Long,(UnitId)Long,(TimeStamp)Long,(ReasonUnavailable)Long,(ProvidingReserve)Bool}"typedef struct _ictypestatusunavailable{ icReferenceNumType AvailabilityRefId; icPlantIdType PlantId; icUnitIdType UnitId; icGMTBasedSType TimeStamp; icAvailReasonCodeType ReasonUnavailable; icBoolean ProvidingReserve; } icTypeStatusUnAvailable;/* * Forecast Type Descriptions */#define IC_TYPE_FORECAST_NAME "Forecast"#define IC_TYPE_FORECAST_TDL \ "{(ForecastReferenceId)Long,(PlantId)Long,(UnitId)Long,(StartTime)Long,(PeriodResolution)Short,(NumberOfPeriods)Long,(ForecastType)Bstring2}"typedef struct _ictypeforecast{ icReferenceNumType ForecastRefId; icPlantIdType PlantId; icUnitIdType UnitId; icGMTBasedSType StartTime; icTimeIntervalSType PeriodResolution; icInt NumberOfPeriods; icUChar ForecastType; } icTypeForecast;/* * Curve Type Descriptions */#define IC_TYPE_CURVE_SEG_DES_NAME "CurveSegmentDescription"#define IC_TYPE_CURVE_SEG_DES_TDL \ "{(Order)Long,(LowRange)Float,(HighRange)Float,(NumberOfSegments)Long}"typedef struct _ictypecurvesegdescription{ icInt Order; icFloat LowRange; icFloat HighRange; icInt NumberOfSegments; } icTypeCurveSegDescription;#define IC_TYPE_CURVE_NAME "Curve"#define IC_TYPE_CURVE_TDL \ "{(PlantId)Long,(UnitId)Long,(CurveType)Long,(NumberOfSegments)Long}"typedef struct _ictypecurve{ icPlantIdType PlantReferenceId; icUnitIdType UnitId; icInt CurveType; /* Spec did not define type ?? */ icInt NumberOfSegments; } icTypeCurve;/* * General Data Report *//* * General Data Report Object Type (Block 8) */#define IC_TYPE_GEN_DATA_REPORT_NAME "GeneralDataReport"#define IC_TYPE_GEN_DATA_REPORT_TDL \ "{Long, Vstring32, Long, Short, Short, Short, Short, Short, Short, Short, Short, Short, Short, Short, Short, Short}"#if 0 /* definition too long, skip type name len =304*/ "{(GeneralDataReportRef)Long,(ReportName)Vstring32,(ReportDateAndTime)Long,(NumberLocalRef)Short,(NumberText1)Short,(NumberText2)Short,(NumberInteger1)Short,(NumberInteger2)Short,(NumberFloat1)Short,(NumberFloat2)Short,(NumberText1Rows)Short,(NumberText2Rows)Short,(NumberInteger1Rows)Short,(NumberInteger2Rows)Short,(NumberFloat1Rows)Short,(NumberFloat2Rows)Short}"#endiftypedef struct _ictypegeneraldatareportheader { icReferenceNumType GeneralDataReportRef; icChar ReportName[MAX_IDENT_LEN+1]; icGMTBasedSType ReportDateAndTime; icNumberType NumberLocalRef; icNumberType NumberText1; icNumberType NumberText2; icNumberType NumberInteger1; icNumberType NumberInteger2; icNumberType NumberFloat1; icNumberType NumberFloat2; icNumberType NumberText1Rows; icNumberType NumberText2Rows; icNumberType NumberInteger1Rows; icNumberType NumberInteger2Rows; icNumberType NumberFloat1Rows; icNumberType NumberFloat2Rows;} icTypeGeneralDataReportHeader ;/* * General Data Response *//* * General Data Response Object Type (Block 8) */#define IC_TYPE_GEN_DATA_RESPONSE_NAME "GeneralDataResponse"#define IC_TYPE_GEN_DATA_RESPONSE_TDL \ "{Long, Vstring32, Long, Long, Long, Vstring128}"#if 0 /* if definition too long, skip type name */ "{(GeneralDataResponseRef)Long,(DataName)Vstring32,(DataDateAndTime)Long,(ResponseData)Long,(ResponseCode)Long,(ResponseText)Vstring128}"#endiftypedef struct _ictypegeneraldataresponse { icReferenceNumType GeneralDataResponseRef; icChar DataName[MAX_IDENT_LEN+1]; icGMTBasedSType DataDateAndTime; ST_INT32 ResponseData; ST_INT32 ResponseCode; icChar ResponseText[MAX_COMMENT_LEN+1];} icTypeGeneralDataResponse ;/* -- Object 'handles' -- *//* These types are considered opaque, and are used to refer to data structures defined within the ICCP API and not visible to the user. */typedef void * icTypeId ; typedef void * icTimerId ; typedef void * icUserData ; typedef void * icRemoteId ; typedef void * icLinkId ; typedef void * icVariableId ; typedef void * icTransferId ; typedef void * icTransferGroupId ; typedef void * icTimeOfDay ; typedef void * icMsgId ; typedef void * icTAVariableId ; /* -- Initialize the API -- */icInt icInitializeAPI( void ) ; /* Must be called first! Puts API in known state */ /* -- Initialize the API for the ICCP PE -- *//* This function is to be used only by -- *//* the ICCP Protocol Engine -- */icInt IcInitializeAPIICPE( void ) ; /* Must be called first! Puts API in known state */ /* -- Shutdown (gracefully) the API -- */int icCloseAPI( void ) ; /* Must be called last! Performs graceful shutdown *//* -- Setup the various Trace parameters -- *//* -- can be called anytime after IcInitializeAPI -- */icInticSetupTrace( icInt traceType, /* type of trace desired, default IC_TRACE_LOG IC_NO_LOG = no TRACE messages IC_TRACE_LOG = basic TRACE messages, with cource/line number as header IC_USER_LOG = messages with user Header IC_SPECTRUM_LOG = Spectrum log messages */ icInt traceLevel, /* another way of setting IC_TRACE_LEVEL */ FILE *traceFilePtr, /* file pointer of where the trace is saved if NULL, it is set to stderr */ icChar *titleText, /* header text used in log messages, max 19 chars, used with traceType IC_USER_LOG,IC_SPECTRUM_LOG */ icErrLogProcType userProc /* additional user specific logging routine, used only with traceType IC_SPECTRUM_LOG */);/* -- Enable the server to use UNIX files for client data set definitions -- *//* -- can be called once after IcInitializeAPI, and before link up -- *//* -- this function works specifically on server -- */icInticUseDataSetFile( icChar *pathName /* UNIX directory name where the files will be saved */);/* -- Enable the client to save server data value definitions -- *//* -- can be called once after IcInitializeAPI, and before link up -- */icInticSaveServerData( icBoolean start, /* TRUE indicates issue the request */ icChar *pathName /* UNIX directory name where the files will be saved */);/* -- Enable the client to exercise various ICCP requests -- *//* -- can be called once after IcInitializeAPI, and before link up -- */icInticEnableProtocolTest( void );/* -- Local System Definition -- */ icInticDefineLocal( icChar *localCCName, /* Local Control Center Name */ icInt maxTransferSets, /* Maximum transfer sets per REMOTE */ icInt maxDataSets, /* Maximum data sets per REMOTE */ icInt maxMMSMsgSize /* Maximum MMS msg size acceptable to this system (actual size is smaller of the local and REMOTE maximum message size */);/* -- Remote System Definition -- */icInticDefineRemote( icChar *remoteCCName, /* Symbolic REMOTE name */ icInt remoteType, /* Either IC_TYPE_ICCP or IC_TYPE_MMS */ icChar *iccpVersion, /* symbolic name of ICCP Version */ icChar *bilateralTableId, /* If IC_TYPE_ICCP, symbolic name of bilateral table version */ icBoolean initiateAssociation, /* If false, we are a server */ icInt associationRequestTimeout,/* Secs. before assoc. timeout */ icInt associationRequestRetry, /* Secs. between assoc. attempts */ icInt replyTimeout, /* Secs. before reply timeout */ icInt shortestPeriodicInterval, /* Shortest REMOTE periodic req. */ icBoolean requestRemoteIdentity, /* If TRUE,REMOTE id is logged */ icBoolean serverDataSets, /* If TRUE,use server data sets else use only client data sets*/ icUserData userData, /* User-defined data object */ icRemoteId *remoteId /* Object handle returned by API */ );/* -- Define local ICCP SupportedFeatrues for the specified remote -- *//* -- This API only applies for remoteType = IC_TYPE_ICCP -- */icInticDefineLocalFeatures( icRemoteId remoteId, /* handle returned by icDefineRemote */ icBoolean block2Supported, /* TRUE if Block 2 is supported */ icBoolean block3Supported, /* TRUE if Block 3 is supported */ icBoolean block4Supported, /* TRUE if Block 4 is supported */ icBoolean block5Supported, /* TRUE if Block 5 is supported */ icBoolean block6Supported, /* TRUE if Block 6 is supported */ icBoolean block7Supported, /* TRUE if Block 7 is supported */ icBoolean block8Supported, /* TRUE if Block 8 is supported */ icBoolean block9Supported, /* TRUE if Block 9 is supported */ icUShort *supportedFeatures /* ICCP Supported Features */);/* -- Domain Names Definition -- */icInticDefineDomainNames( icRemoteId remoteId, /* handle returned by icDefineRemote */ icChar *localDomName, /* Name of domain maintained by local server */ icChar *remoteDomName /* Name of domain maintained by remote server */);/* -- Peer Link Definition -- */icInticDefineLink( icRemoteId remoteId, /* Handle returned by 'icDefineRemote' */ icInt channelNumber, /* Channel for this link (MMS-EASE) */ icChar *localARName, /* Local AR name for MMS-EASE */ icChar *remoteARName1, /* Primary remote AR name */ icChar *remoteARName2,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -