УкраїнськаEnglishmRussian
Вход/Новый

A serie of significant improvements of the module {DAQ,Protocol}.OPC_UA

12.07.2021 10:00 Давность: 3 yrs
Категория: НовостьРазработка

Автор: Roman Savochenko


DAQ.OPC-UA

{DAQ,Protocol}.OPC_UA appended for the Publish service implementation, CHUNKS support on the DAQ-client part and the code coming refactoring in generic.

After the 0.9.4 LTS releasing that appended already for the Logical type DAQ-Parameters support and the Standard type DAQ-Parameters appended for the no requesting the metadata on the server mode and the attributes direct ID and name.

Sponsored by, for working with UAExpert 1.5, Client's Publish and Chunks implementing, significant refactoring, the Logical Level type support and the document complete revision on 10.4 HD: Fund

CLIENT:

  • appended for the Logical type DAQ-Parameters support;
  • the Standard type DAQ-Parameters appended for the no requesting the metadata on the server mode and the attributes direct ID and name;
  • attributes (monitored items) adding moved from attrPrc() directly to enable() and which ensured to call at the controller object start
  • ... and the items processing improved in updating the description, flags and link;
  • values acquisition is unified in processing in the parameter function upVal()
  • ... and the values requesting by the controller object function getValMIt() with the Arrays support
  • ... than preparing closely for builtin the logical parameter type;
  • the DAQ-parameter objects enabled for including other parameters;
  • the EVAL setting and removing for all attributes tested for all modes;
  • structure variables in DAQ-parameters allowed to select them items separately, in the selection browser;
  • the variables list of the DAQ-parameters parsing set to complete parsing with passing empty lines;
  • the DAQ-controller object appended in closing the session and secure channel at it stopping;
  • the controller object common status appended for the detailed information about the used secure channel, session, subscription and the processing monitored items;
  • the request lock renamed to resOPC.

SERVER:

  • the OPC-UA Server object appended for the common server status tab with information about activity of the secure channels;
  • the EndPoint Node object appended for the common status with information about activity of the sessions and subscriptions, also the subscription task period and time of execution.

LIB:

  • unified in specifying the default value of the secure channel life time, what set to 300000 ms;
  • the default LifeTimeCounter of the subscriptions set to 2400;
  • the object NodeId appended for the function operator==() of direct comparing;
  • the function XML_N::childClear() appended by a result of returning the same XML_N object for concatenation;
  • the function curTime() appended for an argument of the clock source specifying with using the function clock_gettime();
  • short functions appended for str2int() and str2uint();
  • some fields renamed: publInterv to publInterval, cntrLifeTime to lifetimeCnt, cntrKeepAlive to maxKeepAliveCnt, maxNotPerPubl to maxNtfPerPubl, en to publEn;
  • fixing "POOL" word on "POLL".

LIB_CLIENT:

  • Client::reqService() appended for the meta command "CloseALL" of closing current session and secure channel;
  • the main client services processing function protIO() adapted to work in the asynchronous mode (not requesting);
    • the function Client::messIO() expanded for the timeout argument with specifying the requesting mode also;
    • the channel writing and reading is separated in MSG packages processing;
    • adaption the secure messages to work with the mixed input buffer;
    • moving the main service request "OPN" under the messages processing due to the renewals sending inward the Publish activity.
  • implemented for the Publish service on the client side:
    • the "Client" object appended for the subobject "Subscr" implementation (but stored in Client::SClntSess) with the functions: activate(), monitoredItemAdd() and monitoredItemDel();
    • the "Client" object appended for the function poll() with:
      • unifying the values reading both for the Read and Publish modes;
      • checking of loss all Publish requests during the OpcUa_ClntPublishResentCntr(2) keep alive count-time;
      • restoring the Publish pool.
    • the object Client::Subscr::MonitItem was added as the monitored items representer with the access under the client resource common lock;
      • the service requests appended for implementation, include processing the responses: CreateSubscription, DeleteSubscriptions, CreateMonitoredItems, Publish, Poll;
      • implemented and tested in the secure policies support at Publish;
      • the target Publish requests pool per subscription set in the virtual function publishReqsPool() with default value 2.
    • appended for the CHUNKS implementation both for requests and responses;
    • completely revised and cleared in the common requesting function reqService() from doubling the arguments and parameters:
      • appended for restoring sessions at reconnection the secure channel;
      • unifying the clearing of the current session and secure channel.
    • the client object appended by the common resources lock mtxData;
    • the message property "timeoutHint" set to 0 for all messages;
    • the Read request returned to the plain requesting with limition on CHUNKS only;
    • the error OpcUa_BadSecureChannelIdInvalid added for clearing the secure channel;
    • Client::SClntSess::{sessOpen,lstMessReq} renamed to {secChnlOpenTm,secLstMessReqTm}
    • ... and prevented from clearing in restoring the session and secure channel;
    • appended for debug message of the request errors.

LIB_SERVER:

  • the server part adapted to work with UAExpert 1.5 for: the attribute AId_Descr of the DAQ-value set to the type OpcUa_LocalizedText, the integer types appended for declaration OpcUa_IntAuto and OpcUa_UIntAuto;
  • the subscriptions processing returned to they processing in a separate task and the function subScrCycle() for:
    • true counting all timeouts to disable;
    • processing the periodicity of subscription and publishing;
    • checking the assigned sessions and secure channels state to close the subscriptions.
  • but the publishing leave for processing in the input channel activity and the function Server::EP::publishCall() with preventing the Publish processing for wrong and foreign Subscriptions, by checking inPrtId, sesTokId and isSecCnlAct;
  • Session unification for: link of the sessions to secure channels switched to single one instead an array, the session checking of all messages appended of preventing of using foreign connections;
  • not final chunk packages switched to send directly, for not append to single TCP-package;
  • EP::mtxData lock switched to PTHREAD_MUTEX_RECURSIVE;
  • the secure channels limited in OpcUa_SecCnlLimit(10) and the publishes queue in OpcUa_ServerMaxPublishQueue(10);
  • EP::secSize() renamed to EP::secN() and there added EP::sessN(), EP::subscrN() and chnlList();
  • Server.SecCnl.{TokenId,TokenIdPrev} renamed to Server.SecCnl.{tokenId,tokenIdPrev}.


2512