namespace ZB.MOM.WW.MxGateway.Worker.MxAccess; public interface IMxAccessServer { /// Registers a client and returns a server handle. /// Name of the client requesting registration. /// Server handle for subsequent operations. int Register(string clientName); /// Unregisters a server handle. /// Server handle to unregister. void Unregister(int serverHandle); /// Adds an item to a server and returns an item handle. /// Server handle identifying the registration. /// Item definition string. /// Item handle for the added item. int AddItem( int serverHandle, string itemDefinition); /// Adds an item with context to a server and returns an item handle. /// Server handle identifying the registration. /// Item definition string. /// Item context string. /// Item handle for the added item. int AddItem2( int serverHandle, string itemDefinition, string itemContext); /// Removes an item from a server. /// Server handle identifying the registration. /// Item handle to remove. void RemoveItem( int serverHandle, int itemHandle); /// Subscribes to change notifications for an item. /// Server handle identifying the registration. /// Item handle to subscribe to. void Advise( int serverHandle, int itemHandle); /// Unsubscribes from change notifications for an item. /// Server handle identifying the registration. /// Item handle to unsubscribe from. void UnAdvise( int serverHandle, int itemHandle); /// Subscribes to supervisory change notifications for an item. /// Server handle identifying the registration. /// Item handle to subscribe to. void AdviseSupervisory( int serverHandle, int itemHandle); /// Writes a value to an item. /// Server handle identifying the registration. /// Item handle to write to. /// COM-marshalable value to write; writes an MXAccess null. /// MXAccess user id (security classification) for the write. void Write( int serverHandle, int itemHandle, object? value, int userId); /// Writes a value with an explicit source timestamp to an item. /// Server handle identifying the registration. /// Item handle to write to. /// COM-marshalable value to write; writes an MXAccess null. /// COM-marshalable source timestamp for the write. /// MXAccess user id (security classification) for the write. void Write2( int serverHandle, int itemHandle, object? value, object? timestamp, int userId); /// Performs a secured/verified write to an item. /// Server handle identifying the registration. /// Item handle to write to. /// MXAccess user id of the operator performing the write. /// MXAccess user id of the verifier authorizing the write. /// COM-marshalable value to write; writes an MXAccess null. void WriteSecured( int serverHandle, int itemHandle, int currentUserId, int verifierUserId, object? value); /// Performs a secured/verified write with an explicit source timestamp. /// Server handle identifying the registration. /// Item handle to write to. /// MXAccess user id of the operator performing the write. /// MXAccess user id of the verifier authorizing the write. /// COM-marshalable value to write; writes an MXAccess null. /// COM-marshalable source timestamp for the write. void WriteSecured2( int serverHandle, int itemHandle, int currentUserId, int verifierUserId, object? value, object? timestamp); }