��� ����
�� �-70
������� ���������� ��������� �-70  

���������������� �� ������� ������ ��

���������� ���������� ��

  ����������
����������� ��������
����������: prglib.a
������: ���� ���� ����� ��

int SvKern_Master
      (int narg, char *sarg[]
      ,int (*App_Ini)(int narg, char *sarg[])
      ,void (*App_End)(void)
      ,int (*App_Setup)(void)
      ,int (*App_Data)(
          int fl_cntr_active, int fl_cntr_ready, int fl_cntr_error,
          int fl_meas_active, int fl_meas_ready, int fl_meas_error)
      ,int fl_alarm
      );

���������-������� ��������� ��� ������� ����������� ���������� ����������� ��, �.�. ��, �������� �� ���������� ��������������� ���������� �� (��������� ����������� ������������, ���� ������, ����, ����������). ���������-������� ������� ������������ ��� ���� ��� �������� ��������� ������������ ��, ������� ����� �������� � ��������������� ���������� - ��������� ���������� ���������� ����������, �������� ����������� ������, ������� ���������� ��������� � ��.

��� ���������-������� ������������ ��� ���� ��� ���������� ������� ������������ ��������� �������������� ���������, ������ �� ������� ������ �� ������� ���� ��������� ������������ "�����" ��������� � ������� ���������� �� �� ��������� ������������. 

��� ���������-������� ���������� ���������� ������ ��������� �������� � �����������. ��������� ��������� - ������������� � ���������� ������, ��������� ���������� ������ � ������ - ����������� � ���������� ����������� ����������-��������, ������� ���������� ���� � �������� ���������� � ���������� ����� �� ���� �������������:

narg, sarg - ��������� ������� main;
App_Ini - ���������-������� ����� ������� ��� ������������� ������ ��;
App_End - ���������-�������, ����������� ������ ��;
App_Setup - ���������-������� ������ �����-���� ���������� �� ������ ����� ��, ���������� ����� ������ ��������� ���������� ������ � ����������� ������������;
App_Data - ���������-�������, ����������� ����������� �������� ����������� (��������� ��������� � ��.); 
������ ���������-������� ����� ������� ��� ������� ���������� ������ � ����������� ������������ � ��� ���������� �����-���� ������:
 
��� ������ ���������� ������ � �� ���������� ��������� ������� �� � ��� ����� ������� ������������ ��������� PrgDBa_PDsave, PrgDBa_TDsave, PrgIni_StatPlane;
 
��� �������� ����������� ������ ������������� ������������ ��������� ���������� bmplib.a;
fl_alarm - ��������� �������� ������ � ����-��������:
 
fl_alarm=0 - ������� ����, ���� ������ �������� "cmt" ��� ������ ���������,
 
fl_alarm=1 - ������� ���� ��� �������.

���� ����������� �������� � �������� ������ ���������� ������ �������� PrgIni_SigIgnSetPrgIni_Start. ���� ���������-������� App_Ini ��������� ������ �� ���������, �� ������ RC_ECOFF, �� ���� �, �������������, ���������� ���������� ������. �������� ������ ���� ����������� - ������ ������� ������������ ����� ������ SV_WAIT_SEC ������ � ���������� �������, ���� ������� ����������. ���� ������� �� ����������, �� ����������� ���������� ������ � ����������� ������������. ���� ������ ������ � �����-���� ������ �� ����������, �� ����������� ����������� �������� ������� �����������. � ������ ������������ �����-���� ������ ���� ���������� ��� ���� ������ � ������� ���������� ��������� MAIN-�������.

����������� �� ������������ ��������� � ���������� ����������, ������� ������������ ����� ��������� ������� ������������ ������ ����������� ����������� ��, ���������� ���������� ��������� ������������ ��. �������� ����������� ������� ������������ � ����, ������� ����� ��� ������������ ��������� �����:

CMD_ENDWORK - ��������� ������ ��;
CMD_PRGLOAD - ���� ������ � ����-�������� ���������, �� ���������, � ��������;
CMD_NEWDATA - �� ������ ��������������� � �����;
CMD_PUTDATA - �������� ������ � �������� ������.

����� © ��������� �.�.