Prosoft-technology MVI56E-LDM Manuel d'utilisateur Page 175

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 264
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 174
ControlLogix Platform "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 169 of 264
March 12, 2014
OCXcip_SetIdObject
Syntax
int OCXcip_SetIdObject (OCXHANDLE apihandle,
OCXCIPIDOBJ *idoObject);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
idobject
Pointer to structure of type OCXCIPIDOBJ
Description
OCXcip_SetIdObject allows an application to customize the identity of a module.
apihandle must be a valid handle returned from OCXcip_Open.
idobject is a pointer to a structure of type OCXCIPIDOBJ. The members of this
structure will be updated with the module identity data.
The following example defines the OCXCIPIDOBJ structure:
typedef struct tagOCXCIPIDOBJ
{
WORD VendorID; //Vendor ID Number
WORD DeviceType; //General product type
WORD ProductCode: //Vendor-specific product identifier
BYTE MajorRevision; //Major revision level
BYTE MinorRevision; //Minor revision level
DWORD SerialNo; //Module serial number
BYTE Name [32]; //Text module name (null-terminated)
} OCXCIPIDOBJ;
Return Value
OCX_SUCCESS
ID object was retrieved successfully
OCX_ERR_NOACCESS
apihandle does not have access
Example
OCXCIPHANDLE apihandle;
OCXCIPIDOBJ idobject;
OCXcip_GetIdObject(apihandle,&idobject); //Get default info
// Change module name
strcpy ((char*) idobject.Name, "Custom Module Name");
OCXcip_SetIdObject (apiHandle, &idobject);
Vue de la page 174
1 2 ... 170 171 172 173 174 175 176 177 178 179 180 ... 263 264

Commentaires sur ces manuels

Pas de commentaire