ConOpSys V2970  P004.07
ANVILEX control operating system
Protocol_Base.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Protocol_Base.h
3 //! @brief Communication protocol base class header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Engine/Protocol_Base.h $
7 //! $Revision: 2944 $
8 //! $Date: 2022-02-26 10:45:42 +0500 (Sa, 26 Feb 2022) $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // Include system files
44 //------------------------------------------------------------------------------
45 
46 #include "System_Date.h"
48 #include "Block_Input_Connector.h"
49 #include "Block_Output_Connector.h"
50 #include "Execution_Profile.h"
51 
52 //------------------------------------------------------------------------------
53 // Protocol base class
54 //------------------------------------------------------------------------------
55 
57 {
58 
59  //----------------------------------------------------------------------------
60  // Public defines, methods and variables
61  //----------------------------------------------------------------------------
62 
63  public:
64 
65  //!-------------------------------------------------------------------------
66  //! @brief Class constructor method
67  //! @note The method create application object.
68  //! @return None
69  //! \par Override
70  //! Not allowed
71  //! @attention Don't call this method directly.
72  //--------------------------------------------------------------------------
73 
75 
76  //!-------------------------------------------------------------------------
77  //! @brief Class destructor method
78  //! @note None
79  //! @return None
80  //! \par Override
81  //! Not allowed
82  //! @attention Don't call this method directly.
83  //--------------------------------------------------------------------------
84 
86 
87  //!-------------------------------------------------------------------------
88  //! @brief Initialisation method
89  //! @note None
90  //! @return None
91  //! \par Override
92  //! Not allowed
93  //! @attention None
94  //--------------------------------------------------------------------------
95 
96  VOID Init();
97 
98  //!-------------------------------------------------------------------------
99  //! @brief Finalisation method
100  //! @note None
101  //! @return None
102  //! \par Override
103  //! Not allowed
104  //! @attention None
105  //--------------------------------------------------------------------------
106 
108 
109  //!-------------------------------------------------------------------------
110  //! @brief Clear communication statistic
111  //! @note None
112  //! @return None
113  //! \par Override
114  //! Not allowed
115  //! @attention None
116  //--------------------------------------------------------------------------
117 
119 
120  //!-------------------------------------------------------------------------
121  //! @brief System task 1ms cyclic execution method
122  //! @note Override this method to implement protocol specific functionality.
123  //! @return None
124  //! \par Override
125  //! Optional
126  //! @attention None
127  //--------------------------------------------------------------------------
128 
129  virtual VOID Execute_1ms();
130 
131  //!-------------------------------------------------------------------------
132  //! @brief Background cyclic execution method
133  //! @note Override this method to implement protocol specific functionality.
134  //! @return None
135  //! \par Override
136  //! Optional
137  //! @attention None
138  //--------------------------------------------------------------------------
139 
140  virtual VOID Execute();
141 
142  //!-------------------------------------------------------------------------
143  //! @brief Send information about protocol method
144  //! @note None
145  //! @param [in] *object_Protocol - Pointer to the communication protocol
146  //! @return None
147  //! \par Override
148  //! Requered
149  //! @attention None
150  //--------------------------------------------------------------------------
151 
152  virtual VOID Send_Information( TProtocol_Base *object_Protocol ) = 0;
153 
154  //!-------------------------------------------------------------------------
155  //! @brief Enter terminal mode method
156  //! @note None
157  //! @return None
158  //! \par Override
159  //! Requered
160  //! @attention None
161  //--------------------------------------------------------------------------
162 
163  virtual VOID Enter_Terminal_Mode() = 0;
164 
165  //!-------------------------------------------------------------------------
166  //! @brief Enter protocol mode method
167  //! @note None
168  //! @return None
169  //! \par Override
170  //! Requered
171  //! @attention None
172  //--------------------------------------------------------------------------
173 
174  virtual VOID Enter_Protocol_Mode() = 0;
175 
176  //!-------------------------------------------------------------------------
177  //! @brief Terminal mode operation status method
178  //! @note None
179  //! @return BOOL - Terminal mode operation status
180  //! @retval false - Communication protocol operates not in terminal mode
181  //! @retval true - Communication protocol operates in terminal mode
182  //! \par Override
183  //! Requered
184  //! @attention None
185  //--------------------------------------------------------------------------
186 
187  virtual BOOL Is_Terminal_Mode() = 0;
188 
189  //!-------------------------------------------------------------------------
190  //! @brief Protocol mode operation status method
191  //! @note None
192  //! @return BOOL - Protocol mode operation status
193  //! @retval false - Communication protocol operates not in protocol mode
194  //! @retval true - Communication protocol operates in protocol mode
195  //! \par Override
196  //! Requered
197  //! @attention None
198  //--------------------------------------------------------------------------
199 
200  virtual BOOL Is_Protocol_Mode() = 0;
201 
202  //!-------------------------------------------------------------------------
203  //! @brief Enable parameter mapping method
204  //! @note None
205  //! @return None
206  //! \par Override
207  //! Not allowed
208  //! @attention None
209  //--------------------------------------------------------------------------
210 
212 
213  //!-------------------------------------------------------------------------
214  //! @brief Disable parameter mapping method
215  //! @note None
216  //! @return None
217  //! \par Override
218  //! Not allowed
219  //! @attention None
220  //--------------------------------------------------------------------------
221 
223 
224  //!-------------------------------------------------------------------------
225  //! @brief Enable show system welcome message method.
226  //! @note None
227  //! @return None
228  //! \par Override
229  //! Requered
230  //! @attention None
231  //--------------------------------------------------------------------------
232 
234 
235  //!-------------------------------------------------------------------------
236  //! @brief Disable show system welcome message method.
237  //! @note None
238  //! @return None
239  //! \par Override
240  //! Requered
241  //! @attention None
242  //--------------------------------------------------------------------------
243 
245 
246  //!-------------------------------------------------------------------------
247  //! @brief Enable system ready message method.
248  //! @note None
249  //! @return None
250  //! \par Override
251  //! Requered
252  //! @attention None
253  //--------------------------------------------------------------------------
254 
256 
257  //!-------------------------------------------------------------------------
258  //! @brief Disable system ready message method.
259  //! @note None
260  //! @return None
261  //! \par Override
262  //! Requered
263  //! @attention None
264  //--------------------------------------------------------------------------
265 
267 
268  //!-------------------------------------------------------------------------
269  //! @brief Transmit boot welcome message method.
270  //! @note None
271  //! @return None
272  //! \par Override
273  //! Requered
274  //! @attention None
275  //--------------------------------------------------------------------------
276 
278 
279  //!-------------------------------------------------------------------------
280  //! @brief Transmit system ready message method.
281  //! @note None
282  //! @return None
283  //! \par Override
284  //! Requered
285  //! @attention None
286  //--------------------------------------------------------------------------
287 
289 /*
290  //!-------------------------------------------------------------------------
291  //! @brief Receive character
292  //! @note None
293  //! @param [in] c8_Character - Received character
294  //! @return None
295  //! \par Override
296  //! Requered
297  //! @attention None
298  //--------------------------------------------------------------------------
299 
300  virtual VOID Receive_Char( C8 c8_Character ) = 0;
301 */
302  //!-------------------------------------------------------------------------
303  //! @brief Receive string
304  //! @note None
305  //! @param [in] *c8_String - Pointer to the null terminated string of characters
306  //! @return None
307  //! \par Override
308  //! Requered
309  //! @attention None
310  //--------------------------------------------------------------------------
311 
312  virtual VOID Receive_String( C8 *c8_String ) = 0;
313 
314  //!-------------------------------------------------------------------------
315  //! @brief Receive string
316  //! @note None
317  //! @param [in] *c8_String - Pointer to the string of characters
318  //! @param [in] *u32_Length - Length of the string
319  //! @return None
320  //! \par Override
321  //! Requered
322  //! @attention None
323  //--------------------------------------------------------------------------
324 
325  virtual VOID Receive_String( C8 *c8_String, U32 u32_Length ) = 0;
326 
327  //!-------------------------------------------------------------------------
328  //! @brief Receive character
329  //! @note None
330  //! @param [in] c8_Character - Character to transmit
331  //! @return None
332  //! \par Override
333  //! Not allowed
334  //! @attention None
335  //--------------------------------------------------------------------------
336 
337  VOID Transmit_Char( C8 c8_Character );
338 
339  VOID Transmit_String_Of_Char( C8 c8_Character, U32 u32_Count );
340  VOID Transmit_String_Of_Char( C8 c8_Character, U32 u32_Count, U32 u32_End_New_Line_Count );
341  VOID Transmit_String( C8 *c8_String );
342  VOID Transmit_String( U32 u32_Begin_New_Lines_Count, C8 *c8_String );
343  VOID Transmit_String( C8 *c8_String, U32 u32_End_New_Line_Count );
344  VOID Transmit_String( U32 u32_Begin_New_Lines_Count, C8 *c8_String, U32 u32_End_New_Line_Count );
345 
346 // VOID Transmit_String_As_Hex( C8 *c8_String );
347 
348  VOID Transmit_New_Line(); //!< Transmit new line
349  VOID Transmit_New_Line( U32 u32_Count ); //!< Transmit new lines
350 
351  // Connector value transmition related methods
353  VOID Transmit_Connector_Value_As_Boolean( TBlock_Input_Connector *object_Connector, U32 u32_End_New_Line_Count );
355  VOID Transmit_Connector_Value_As_Decimal( TBlock_Input_Connector *object_Connector, U32 u32_End_New_Line_Count );
357  VOID Transmit_Connector_Value_As_Hex( TBlock_Input_Connector *object_Connector, U32 u32_End_New_Line_Count );
359  VOID Transmit_Connector_Value_As_Boolean( TBlock_Output_Connector *object_Connector, U32 u32_End_New_Line_Count );
361  VOID Transmit_Connector_Value_As_Decimal( TBlock_Output_Connector *object_Connector, U32 u32_End_New_Line_Count );
363  VOID Transmit_Connector_Value_As_Hex( TBlock_Output_Connector *object_Connector, U32 u32_End_New_Line_Count );
364 
365 // VOID Transmit_Parameter_As_Hex( TParameter_Pase *object_Parameter );
366 
367  // Variant transmision related methods
369  VOID Transmit_Variant_As_Hex( TConOpSys_Variant *object_Value, U32 u32_End_New_Line_Count );
370 
372  VOID Transmit_BOOL_Value_As_Decimal( BOOL bool_Value, U32 u32_End_New_Line_Count );
373  VOID Transmit_BOOL_Value_As_Hex( BOOL bool_Value );
374  VOID Transmit_BOOL_Value_As_Hex( BOOL bool_Value, U32 u32_End_New_Line_Count );
375 
377  VOID Transmit_TRIL_Value_As_Decimal( TRIL tril_Value, U32 u32_End_New_Line_Count );
378 // ANVILEX: To implement
379 // VOID Transmit_TRIL_Value_As_Hex( TRIL tril_Value );
380 // VOID Transmit_TRIL_Value_As_Hex( TRIL tril_Value, U32 u32_End_New_Line_Count );
381 
383  VOID Transmit_U8_Value_As_Decimal( U8 u8_Value, U32 u32_End_New_Line_Count );
384  VOID Transmit_U8_Value_As_Hex( U8 u8_Value );
385  VOID Transmit_U8_Value_As_Hex( U8 u8_Value, U32 u32_End_New_Line_Count );
386 
387  VOID Transmit_U8_Buffer( U8 *u8_Data_Buffer, U32 u32_Length );
388 
390  VOID Transmit_I8_Value_As_Decimal( I8 i8_Value, U32 u32_End_New_Line_Count );
391  VOID Transmit_I8_Value_As_Hex( I8 i8_Value );
392  VOID Transmit_I8_Value_As_Hex( I8 i8_Value, U32 u32_End_New_Line_Count );
393 
395  VOID Transmit_U16_Value_As_Decimal( U16 u16_Value, U32 u32_End_New_Line_Count );
396  VOID Transmit_U16_Value_As_Hex( U16 u16_Value );
397  VOID Transmit_U16_Value_As_Hex( U16 u16_Value, U32 u32_End_New_Line_Count );
398 
400  VOID Transmit_I16_Value_As_Decimal( I16 i16_Value, U32 u32_End_New_Line_Count );
401  VOID Transmit_I16_Value_As_Hex( I16 i16_Value );
402  VOID Transmit_I16_Value_As_Hex( I16 i16_Value, U32 u32_End_New_Line_Count );
403 
405  VOID Transmit_U32_Value_As_Decimal( U32 u32_Value, U32 u32_End_New_Line_Count );
406  VOID Transmit_U32_Value_As_Hex( U32 u32_Value );
407  VOID Transmit_U32_Value_As_Hex( U32 u32_Value, U32 u32_End_New_Line_Count );
408 
410  VOID Transmit_I32_Value_As_Decimal( I32 i32_Value, U32 u32_End_New_Line_Count );
411  VOID Transmit_I32_Value_As_Hex( I32 i32_Value );
412  VOID Transmit_I32_Value_As_Hex( I32 i32_Value, U32 u32_End_New_Line_Count );
413 
415  VOID Transmit_U64_Value_As_Decimal( U64 u64_Value, U32 u32_End_New_Line_Count );
416  VOID Transmit_U64_Value_As_Hex( U64 u64_Value );
417  VOID Transmit_U64_Value_As_Hex( U64 u64_Value, U32 u32_End_New_Line_Count );
418 
420  VOID Transmit_I64_Value_As_Decimal( I64 i64_Value, U32 u32_End_New_Line_Count );
421  VOID Transmit_I64_Value_As_Hex( I64 i64_Value );
422  VOID Transmit_I64_Value_As_Hex( I64 i64_Value, U32 u32_End_New_Line_Count );
423 
425  VOID Transmit_F32_Value_As_Decimal( F32 f32_Value, U32 u32_End_New_Line_Count );
426  VOID Transmit_F32_Value_As_Hex( F32 f32_Value );
427  VOID Transmit_F32_Value_As_Hex( F32 f32_Value, U32 u32_End_New_Line_Count );
428 
430  VOID Transmit_F64_Value_As_Decimal( F64 f64_Value, U32 u32_End_New_Line_Count );
431  VOID Transmit_F64_Value_As_Hex( F64 f64_Value );
432  VOID Transmit_F64_Value_As_Hex( F64 f64_Value, U32 u32_End_New_Line_Count );
433 
435  VOID Transmit_DateTime_Structure_Value_As_String( TDate_Time::TDate_Time_Structure struct_DateTime_Structure, U32 u32_End_New_Line_Count );
436 
437  VOID Transmit_Buffer_As_U8_Dump( U32 u32_Address, U32 u32_Size, U8 *u8_Buffer, BOOL bool_Align );
438 
439  //!-------------------------------------------------------------------------
440  //! @brief Set node address
441  //! @note None
442  //! @param [in] u8_Address - New node address
443  //! @return BOOL - Status of the method execution
444  //! @retval false - Error occures during method execution
445  //! @retval true - No error detected
446  //! \par Override
447  //! Optional
448  //! @attention None
449  //--------------------------------------------------------------------------
450 
451  virtual BOOL Set_Address( U8 u8_Address );
452 
453  //--------------------------------------------------------------------------
454  // Communication statistic related methods
455  //--------------------------------------------------------------------------
456 
457  //!-------------------------------------------------------------------------
458  //! @brief Log message event for statistics purpouses
459  //! @note None
460  //! @return None
461  //! \par Override
462  //! Not allowed
463  //! @attention None
464  //--------------------------------------------------------------------------
465 
467 
468  //!-------------------------------------------------------------------------
469  //! @brief Log communication error event for statistics purpouses
470  //! @note None
471  //! @return None
472  //! \par Override
473  //! Not allowed
474  //! @attention None
475  //--------------------------------------------------------------------------
476 
478 
479  //!-------------------------------------------------------------------------
480  //! @brief Log character overrun error event for statistics purpouses
481  //! @note None
482  //! @return None
483  //! \par Override
484  //! Not allowed
485  //! @attention None
486  //--------------------------------------------------------------------------
487 
489 
490  //!-------------------------------------------------------------------------
491  //! @brief Log frame size error event for statistics purpouses
492  //! @note None
493  //! @return None
494  //! \par Override
495  //! Not allowed
496  //! @attention None
497  //--------------------------------------------------------------------------
498 
500 
501  //!-------------------------------------------------------------------------
502  //! @brief Log CRC error event for statistics purpouses
503  //! @note None
504  //! @return None
505  //! \par Override
506  //! Not allowed
507  //! @attention None
508  //--------------------------------------------------------------------------
509 
511 
512  //!-------------------------------------------------------------------------
513  //! @brief Log slave exception error event for statistics purpouses
514  //! @note None
515  //! @return None
516  //! \par Override
517  //! Not allowed
518  //! @attention None
519  //--------------------------------------------------------------------------
520 
522 
523  //!-------------------------------------------------------------------------
524  //! @brief Log slave messege event for statistics purpouses
525  //! @note None
526  //! @return None
527  //! \par Override
528  //! Not allowed
529  //! @attention None
530  //--------------------------------------------------------------------------
531 
533 
534  //!-------------------------------------------------------------------------
535  //! @brief Log slave broadcast messege event for statistics purpouses
536  //! @note None
537  //! @return None
538  //! \par Override
539  //! Not allowed
540  //! @attention None
541  //--------------------------------------------------------------------------
542 
544 
545  //!-------------------------------------------------------------------------
546  //! @brief Log slave unknown request event for statistics purpouses
547  //! @note None
548  //! @return None
549  //! \par Override
550  //! Not allowed
551  //! @attention None
552  //--------------------------------------------------------------------------
553 
555 
556  //!-------------------------------------------------------------------------
557  //! @brief Log slave no responce event for statistics purpouses
558  //! @note None
559  //! @return None
560  //! \par Override
561  //! Not allowed
562  //! @attention None
563  //--------------------------------------------------------------------------
564 
566 
567  //!-------------------------------------------------------------------------
568  //! @brief Log slave no acknowledge event for statistics purpouses
569  //! @note None
570  //! @return None
571  //! \par Override
572  //! Not allowed
573  //! @attention None
574  //--------------------------------------------------------------------------
575 
577 
578  //!-------------------------------------------------------------------------
579  //! @brief Log slave busy event for statistics purpouses
580  //! @note None
581  //! @return None
582  //! \par Override
583  //! Not allowed
584  //! @attention None
585  //--------------------------------------------------------------------------
586 
588 
589  //!-------------------------------------------------------------------------
590  //! @brief Log parameter information request event for statistics purpouses
591  //! @note None
592  //! @return None
593  //! \par Override
594  //! Not allowed
595  //! @attention None
596  //--------------------------------------------------------------------------
597 
599 
600  //!-------------------------------------------------------------------------
601  //! @brief Log parameter information request error event for statistics purpouses
602  //! @note None
603  //! @return None
604  //! \par Override
605  //! Not allowed
606  //! @attention None
607  //--------------------------------------------------------------------------
608 
610 
611  //!-------------------------------------------------------------------------
612  //! @brief Log parameter read event for statistics purpouses
613  //! @note None
614  //! @return None
615  //! \par Override
616  //! Not allowed
617  //! @attention None
618  //--------------------------------------------------------------------------
619 
621 
622  //!-------------------------------------------------------------------------
623  //! @brief Log parameter read error event for statistics purpouses
624  //! @note None
625  //! @return None
626  //! \par Override
627  //! Not allowed
628  //! @attention None
629  //--------------------------------------------------------------------------
630 
632 
633  //!-------------------------------------------------------------------------
634  //! @brief Log parameter write event for statistics purpouses
635  //! @note None
636  //! @return None
637  //! \par Override
638  //! Not allowed
639  //! @attention None
640  //--------------------------------------------------------------------------
641 
643 
644  //!-------------------------------------------------------------------------
645  //! @brief Log parameter write error event for statistics purpouses
646  //! @note None
647  //! @return None
648  //! \par Override
649  //! Not allowed
650  //! @attention None
651  //--------------------------------------------------------------------------
652 
654 
655  //!-------------------------------------------------------------------------
656  //! @brief Log system event information request event for statistics purpouses
657  //! @note None
658  //! @return None
659  //! \par Override
660  //! Not allowed
661  //! @attention None
662  //--------------------------------------------------------------------------
663 
665 
666  //!-------------------------------------------------------------------------
667  //! @brief Log system event information request error event for statistics purpouses
668  //! @note None
669  //! @return None
670  //! \par Override
671  //! Not allowed
672  //! @attention None
673  //--------------------------------------------------------------------------
674 
676 
677  //----------------------------------------------------------------------------
678  // Protected defines, methods and variables
679  //----------------------------------------------------------------------------
680 
681  protected:
682 
683  //!-------------------------------------------------------------------------
684  //! @brief Indicate new data for processing arrived
685  //! @note Calling this method indicates that new data arrived and can be processed.
686  //! @return None
687  //! \par Override
688  //! Not allowed
689  //! @attention None
690  //--------------------------------------------------------------------------
691 
693 
694  //!-------------------------------------------------------------------------
695  //! @brief Indicate new data processed
696  //! @note Calling this method indicates that new data processed.
697  //! @return None
698  //! \par Override
699  //! Not allowed
700  //! @attention None
701  //--------------------------------------------------------------------------
702 
704 
705  //!-------------------------------------------------------------------------
706  //! @brief Return new data presentse status
707  //! @note None
708  //! @return BOOL - New data presentse status
709  //! @retval false - No new data present
710  //! @retval true - New data present
711  //! \par Override
712  //! Not allowed
713  //! @attention None
714  //--------------------------------------------------------------------------
715 
717 
718  //!-------------------------------------------------------------------------
719  //! @brief Return new data processed status
720  //! @note None
721  //! @return BOOL - New data processed status
722  //! @retval false - New data not processed
723  //! @retval true - New data processed
724  //! \par Override
725  //! Not allowed
726  //! @attention None
727  //--------------------------------------------------------------------------
728 
730 
731  //--------------------------------------------------------------------------
732  // Protected variables
733  //--------------------------------------------------------------------------
734 
735  //! @brief Parameter mapping enable flag
737 
738  //! @brief Total communication bus message counter.
739  //! @note MODBUS field: CPT 1
741 
742  //! @brief Communication bus error counter.
743  //! @note MODBUS field: CPT 2
745 
746  //! @brief Communication bus character overrun error counter.
747  //! @note MODBUS field: CPT 8
749 
750  //! @brief Communication bus CRC error counter.
752 
753  //! @brief Communication bus frame size error counter.
755 
756  //! @brief Slave exception error counter.
757  //! @note MODBUS field: CPT 3
759 
760  //! @brief Total slave message counter.
761  //! @note MODBUS field: CPT 4
763 
764  //! @brief Slave broadcast message counter.
766 
767  //! @brief Slave unknown request counter.
769 
770  //! @brief Slave no responce counter.
771  //! @note MODBUS field: CPT 5
773 
774  //! @brief Slave no acknowledge counter.
775  //! @note MODBUS field: CPT 6
777 
778  //! @brief Slave busy counter.
779  //! @note MODBUS field: CPT 7
781 
782  //! @brief Parameter information request counter.
784 
785  //! @brief Parameter information request error counter.
787 
788  //! @brief Parameter read request counter.
790 
791  //! @brief Parameter read request error counter.
793 
794  //! @brief Parameter write request counter.
796 
797  //! @brief Parameter write request error counter.
799 
800  //! @brief Event information request counter.
802 
803  //! @brief Event information request error counter.
805 
806  //! @brief Execution profile object
808 
809  //----------------------------------------------------------------------------
810  // Private defines, methods and variables
811  //----------------------------------------------------------------------------
812 
813  private:
814 
815  //--------------------------------------------------------------------------
816  // private variables
817  //--------------------------------------------------------------------------
818 
819  //! @brief New data present flag
821 
822 };
823 
824 //------------------------------------------------------------------------------
825 // End of file
826 //------------------------------------------------------------------------------
Block input connecttor class header file.
Block output connecttor class header file.
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
unsigned long long U64
Binary 64-Bit unsigned integer datatype defenition.
Definition: Defines.h:213
int TRIL
Thrilean datatype defenition.
Definition: Defines.h:143
long I32
2s Compliment 32-Bit signed integer datatype defenition
Definition: Defines.h:206
unsigned char U8
Binary 8-Bit unsigned integer datatype defenition.
Definition: Defines.h:183
signed char I8
2s Compliment 8-Bit signed integer datatype defenition
Definition: Defines.h:186
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
float F32
IEEE-754 32-Bit single presession floating point numbers datatype defenition.
Definition: Defines.h:324
short I16
2s Compliment 16-Bit signed integer datatype defenition
Definition: Defines.h:196
long long I64
2s Compliment 64-Bit signed integer datatype defenition
Definition: Defines.h:217
double F64
IEEE-754 64-Bit double presession floating point numbers datatype defenition.
Definition: Defines.h:327
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
char C8
ASCII 8-Bit char datatype defenition.
Definition: Defines.h:156
Execution profile class header file.
System date and time calss implementation.
Function block input connector class.
Definition: Block_Input_Connector.h:83
Function block output connector class.
Definition: Block_Output_Connector.h:59
ConOpSys variant class.
Definition: ConOpSys_Variant.h:851
Execution profile class.
Definition: Execution_Profile.h:62
Definition: Protocol_Base.h:57
VOID Transmit_String_Of_Char(C8 c8_Character, U32 u32_Count)
Definition: Protocol_Base.cpp:191
VOID Log_Event_Information_Request_Error()
Log system event information request error event for statistics purpouses.
Definition: Protocol_Base.cpp:2585
VOID Transmit_F32_Value_As_Hex(F32 f32_Value)
Definition: Protocol_Base.cpp:2095
virtual VOID Receive_String(C8 *c8_String)=0
Receive string.
U32 u32_Slave_Message_Counter
Total slave message counter.
Definition: Protocol_Base.h:762
VOID Disable_Parameter_Mapping()
Disable parameter mapping method.
Definition: Protocol_Base.cpp:164
VOID Log_Parameter_Information_Request_Error()
Log parameter information request error event for statistics purpouses.
Definition: Protocol_Base.cpp:2513
virtual VOID Receive_String(C8 *c8_String, U32 u32_Length)=0
Receive string.
VOID Transmit_U32_Value_As_Decimal(U32 u32_Value)
Definition: Protocol_Base.cpp:1792
virtual VOID Execute_1ms()
System task 1ms cyclic execution method.
Definition: Protocol_Base.cpp:130
BOOL bool_New_Data_Present
New data present flag.
Definition: Protocol_Base.h:820
VOID Log_Slave_Busy()
Log slave busy event for statistics purpouses.
Definition: Protocol_Base.cpp:2489
U32 u32_Slave_No_Acknowledge_Counter
Slave no acknowledge counter.
Definition: Protocol_Base.h:776
U32 u32_Bus_Message_Counter
Total communication bus message counter.
Definition: Protocol_Base.h:740
VOID Log_Parameter_Information_Request()
Log parameter information request event for statistics purpouses.
Definition: Protocol_Base.cpp:2501
VOID Transmit_TRIL_Value_As_Decimal(TRIL tril_Value)
Definition: Protocol_Base.cpp:1446
virtual VOID Show_System_Ready_Message_Enable()=0
Enable system ready message method.
virtual VOID Execute()
Background cyclic execution method.
Definition: Protocol_Base.cpp:141
TProtocol_Base()
Class constructor method.
Definition: Protocol_Base.cpp:71
U32 u32_Parameter_Write_Request_Counter
Parameter write request counter.
Definition: Protocol_Base.h:795
U32 u32_Event_Information_Request_Counter
Event information request counter.
Definition: Protocol_Base.h:801
U32 u32_Bus_CRC_Error_Counter
Communication bus CRC error counter.
Definition: Protocol_Base.h:751
VOID New_Data_Arrived()
Indicate new data for processing arrived.
Definition: Protocol_Base.cpp:2309
BOOL Is_New_Data_Processed()
Return new data processed status.
Definition: Protocol_Base.cpp:2345
virtual VOID Send_Information(TProtocol_Base *object_Protocol)=0
Send information about protocol method.
U32 u32_Slave_Busy_Counter
Slave busy counter.
Definition: Protocol_Base.h:780
VOID Log_Parameter_Write_Request()
Log parameter write event for statistics purpouses.
Definition: Protocol_Base.cpp:2549
virtual VOID Show_System_Ready_Message_Disable()=0
Disable system ready message method.
virtual VOID Transmit_System_Ready_Message()=0
Transmit system ready message method.
VOID Transmit_BOOL_Value_As_Hex(BOOL bool_Value)
Definition: Protocol_Base.cpp:1398
VOID Done()
Finalisation method.
U32 u32_Parameter_Write_Request_Error_Counter
Parameter write request error counter.
Definition: Protocol_Base.h:798
virtual BOOL Is_Terminal_Mode()=0
Terminal mode operation status method.
VOID Init()
Initialisation method.
Definition: Protocol_Base.cpp:87
VOID Transmit_U8_Value_As_Decimal(U8 u8_Value)
Definition: Protocol_Base.cpp:1522
BOOL Is_New_Data_Present()
Return new data presentse status.
Definition: Protocol_Base.cpp:2333
VOID Log_Parameter_Read_Request()
Log parameter read event for statistics purpouses.
Definition: Protocol_Base.cpp:2525
VOID Log_Parameter_Write_Request_Error()
Log parameter write error event for statistics purpouses.
Definition: Protocol_Base.cpp:2561
VOID Log_Slave_No_Acknowledge()
Log slave no acknowledge event for statistics purpouses.
Definition: Protocol_Base.cpp:2477
U32 u32_Parameter_Read_Request_Error_Counter
Parameter read request error counter.
Definition: Protocol_Base.h:792
VOID Transmit_Connector_Value_As_Boolean(TBlock_Input_Connector *object_Connector)
Definition: Protocol_Base.cpp:341
BOOL bool_Parameter_Mapping_Enable
Parameter mapping enable flag.
Definition: Protocol_Base.h:736
virtual VOID Transmit_Boot_Welcome_Message()=0
Transmit boot welcome message method.
VOID Transmit_String(C8 *c8_String)
Definition: Protocol_Base.cpp:233
U32 u32_Parameter_Information_Request_Counter
Parameter information request counter.
Definition: Protocol_Base.h:783
VOID Enable_Parameter_Mapping()
Enable parameter mapping method.
Definition: Protocol_Base.cpp:152
U32 u32_Slave_Unknown_Request_Counter
Slave unknown request counter.
Definition: Protocol_Base.h:768
VOID Transmit_U32_Value_As_Hex(U32 u32_Value)
Definition: Protocol_Base.cpp:1825
VOID Transmit_Connector_Value_As_Decimal(TBlock_Input_Connector *object_Connector)
Definition: Protocol_Base.cpp:401
VOID Transmit_I32_Value_As_Decimal(I32 i32_Value)
Definition: Protocol_Base.cpp:1859
VOID Log_Parameter_Read_Request_Error()
Log parameter read error event for statistics purpouses.
Definition: Protocol_Base.cpp:2537
VOID New_Data_Processed()
Indicate new data processed.
Definition: Protocol_Base.cpp:2321
VOID Transmit_U8_Buffer(U8 *u8_Data_Buffer, U32 u32_Length)
Definition: Protocol_Base.cpp:1583
VOID Transmit_Char(C8 c8_Character)
Receive character.
Definition: Protocol_Base.cpp:176
virtual BOOL Set_Address(U8 u8_Address)
Set node address.
Definition: Protocol_Base.cpp:2610
VOID Transmit_U16_Value_As_Hex(U16 u16_Value)
Definition: Protocol_Base.cpp:1665
VOID Log_Event_Information_Request()
Log system event information request event for statistics purpouses.
Definition: Protocol_Base.cpp:2573
U32 u32_Parameter_Information_Request_Error_Counter
Parameter information request error counter.
Definition: Protocol_Base.h:786
VOID Transmit_Buffer_As_U8_Dump(U32 u32_Address, U32 u32_Size, U8 *u8_Buffer, BOOL bool_Align)
Definition: Protocol_Base.cpp:2273
VOID Log_Bus_Character_Overrun()
Log character overrun error event for statistics purpouses.
Definition: Protocol_Base.cpp:2381
VOID Transmit_New_Line()
Transmit new line.
Definition: Protocol_Base.cpp:305
VOID Transmit_Variant_As_Hex(TConOpSys_Variant *object_Value)
Definition: Protocol_Base.cpp:1317
VOID Transmit_U64_Value_As_Hex(U64 u64_Value)
Definition: Protocol_Base.cpp:1956
TExecution_Profile object_Execution_Profile
Execution profile object.
Definition: Protocol_Base.h:807
VOID Log_Slave_No_Response()
Log slave no responce event for statistics purpouses.
Definition: Protocol_Base.cpp:2465
VOID Log_Slave_Message()
Log slave messege event for statistics purpouses.
Definition: Protocol_Base.cpp:2429
VOID Log_Bus_Communication_Error()
Log communication error event for statistics purpouses.
Definition: Protocol_Base.cpp:2369
U32 u32_Slave_No_Response_Counter
Slave no responce counter.
Definition: Protocol_Base.h:772
VOID Transmit_I8_Value_As_Hex(I8 i8_Value)
Definition: Protocol_Base.cpp:1634
U32 u32_Bus_Character_Overrun_Counter
Communication bus character overrun error counter.
Definition: Protocol_Base.h:748
VOID Transmit_U64_Value_As_Decimal(U64 u64_Value)
Definition: Protocol_Base.cpp:1923
VOID Transmit_I32_Value_As_Hex(I32 i32_Value)
Definition: Protocol_Base.cpp:1892
VOID Log_Slave_Exception_Error()
Log slave exception error event for statistics purpouses.
Definition: Protocol_Base.cpp:2417
virtual VOID Enter_Terminal_Mode()=0
Enter terminal mode method.
U32 u32_Event_Information_Request_Error_Counter
Event information request error counter.
Definition: Protocol_Base.h:804
VOID Transmit_F64_Value_As_Hex(F64 f64_Value)
Definition: Protocol_Base.cpp:2160
VOID Transmit_U8_Value_As_Hex(U8 u8_Value)
Definition: Protocol_Base.cpp:1555
VOID Clear_Communication_Statistic()
Clear communication statistic.
Definition: Protocol_Base.cpp:99
VOID Log_Slave_Broadcast_Message()
Log slave broadcast messege event for statistics purpouses.
Definition: Protocol_Base.cpp:2441
U32 u32_Slave_Exception_Error_Counter
Slave exception error counter.
Definition: Protocol_Base.h:758
VOID Log_Bus_Frame_Size_Error()
Log frame size error event for statistics purpouses.
Definition: Protocol_Base.cpp:2405
U32 u32_Bus_Frame_Size_Error_Counter
Communication bus frame size error counter.
Definition: Protocol_Base.h:754
VOID Transmit_U16_Value_As_Decimal(U16 u16_Value)
Definition: Protocol_Base.cpp:1695
VOID Transmit_BOOL_Value_As_Decimal(BOOL bool_Value)
Definition: Protocol_Base.cpp:1350
VOID Transmit_I64_Value_As_Hex(I64 i64_Value)
Definition: Protocol_Base.cpp:2031
VOID Log_Bus_CRC_Error()
Log CRC error event for statistics purpouses.
Definition: Protocol_Base.cpp:2393
~TProtocol_Base()
Class destructor method.
Definition: Protocol_Base.cpp:79
VOID Transmit_F64_Value_As_Decimal(F64 f64_Value)
Definition: Protocol_Base.cpp:2127
virtual VOID Enter_Protocol_Mode()=0
Enter protocol mode method.
U32 u32_Parameter_Read_Request_Counter
Parameter read request counter.
Definition: Protocol_Base.h:789
VOID Log_Bus_Message()
Log message event for statistics purpouses.
Definition: Protocol_Base.cpp:2357
VOID Log_Slave_Unknown_Request_Error()
Log slave unknown request event for statistics purpouses.
Definition: Protocol_Base.cpp:2453
U32 u32_Bus_Communication_Error_Counter
Communication bus error counter.
Definition: Protocol_Base.h:744
VOID Transmit_F32_Value_As_Decimal(F32 f32_Value)
Definition: Protocol_Base.cpp:2062
virtual VOID Show_System_Welcome_Message_Enable()=0
Enable show system welcome message method.
virtual VOID Show_System_Welcome_Message_Disable()=0
Disable show system welcome message method.
VOID Transmit_I16_Value_As_Hex(I16 i16_Value)
Definition: Protocol_Base.cpp:1761
VOID Transmit_I64_Value_As_Decimal(I64 i64_Value)
Definition: Protocol_Base.cpp:1998
VOID Transmit_I8_Value_As_Decimal(I8 i8_Value)
Definition: Protocol_Base.cpp:1601
VOID Transmit_I16_Value_As_Decimal(I16 i16_Value)
Definition: Protocol_Base.cpp:1728
VOID Transmit_Connector_Value_As_Hex(TBlock_Input_Connector *object_Connector)
Definition: Protocol_Base.cpp:615
U32 u32_Slave_Broadcast_Message_Counter
Slave broadcast message counter.
Definition: Protocol_Base.h:765
VOID Transmit_DateTime_Structure_Value_As_String(TDate_Time::TDate_Time_Structure struct_DateTime_Structure)
Definition: Protocol_Base.cpp:2192
virtual BOOL Is_Protocol_Mode()=0
Protocol mode operation status method.
Date and time structure.
Definition: System_Date.h:88