lib-tstcomm-3_3.mpad 18.5 KB
Newer Older
1
-- =============================================================================
2
-- Copyright (C) 2003-2020 Tecgraf/PUC-Rio, PETROBRAS S/A
3
4
-- Instituto Tecgraf <mpa@tecgraf.puc-rio.br>
-- Arquivo gerado pelo programa MPA
5
-- Verso:  6.4
6
-- Arquivo: lib-tstcomm.mpad
7
-- Data:    26/02/2021 10:36:47
8
9
10
-- =============================================================================

MPA_5_0 = true
11
12
13
EXPANDED = {
  [0] = true,
}
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
DisabledDiagrams = {
}

Diagrams = {
  {
    id = "TSTCOMM [Principal]",
    name = "TSTCOMM [Principal]",
    kind = "Flow",
    description = nil,
    isApplication = true,
    globals = {
    },
    errorFunction = nil,
    haltDiagram = nil,
    Nodes = {
      {
        type = "Command",
        description = nil,
        action = {
          _switch = "DIAGRAMCALL",
          beforemsg = nil,
          aftermsg = nil,
36
37
38
39
40
41
42
          expressions = {
            "1",
            "nil",
            "true",
            "nil",
            "nil",
          },
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
          variables = {},
          diagramid = "TSTCOMM {Executa}",
          operation = "call",
        },
        xmin = 4740,
        ymin = 5020,
        xmax = 5220,
        ymax = 5140,
      },
    },
    Links = {
      {
        type = "Link",
        description = nil,
        from = nil,
        to = 1,
59
60
61
62
63
64
65
66
        x = {
          4640,
          4980,
        },
        y = {
          5080,
          5080,
        },
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
      },
    },
    Areas = {
    },
    Hidden = {
    },
  },
  {
    id = "TSTCOMM {Executa}",
    name = "TSTCOMM {Executa}",
    kind = "Flow",
    description = nil,
    isApplication = false,
    globals = {
      {
        name = "reg_tst",
        type = "registro",
        list = false,
        value = "tstcomm-reg-tst",
        comment = nil,
        is_arg = false,
        is_ret = false,
      },
      {
        name = "num_testes",
        type = "INTEGER",
        list = false,
        value = nil,
        comment = "Nmero de vezes que o teste deve ser repetido.",
        is_arg = true,
        is_ret = false,
      },
      {
        name = "int_testes",
        type = "REAL",
        list = false,
        value = nil,
        comment = "Intervalo entre as repeties do teste de comunicao.",
        is_arg = true,
        is_ret = false,
      },
      {
        name = "criar_reg",
        type = "BOOLEAN",
        list = false,
        value = nil,
        comment = "Criar nova verso de Registro",
        is_arg = true,
        is_ret = false,
      },
      {
        name = "dim_blocos",
        type = "INTEGER",
        list = false,
        value = nil,
        comment = "Dimenso mxima de blocos de leitura",
        is_arg = true,
        is_ret = false,
      },
      {
        name = "int_blocos",
        type = "INTEGER",
        list = false,
        value = nil,
        comment = "Intervalo entre blocos",
        is_arg = true,
        is_ret = false,
      },
    },
    errorFunction = nil,
    haltDiagram = nil,
    Nodes = {
      {
        type = "Command",
        description = "cria nova\nverso de\n$object",
        action = {
          _switch = "OBJECTCALL",
          beforemsg = nil,
          aftermsg = nil,
          expressions = {},
          variables = {},
          classid = "registro",
          objname = "reg_tst",
          member = "criar_nova_versao",
          operation = "call",
        },
        xmin = 4340,
        ymin = 5280,
        xmax = 4540,
        ymax = 5400,
      },
      {
        type = "Command",
        description = "$result = \n$name\n$parameters",
        action = {
          _switch = "FUNCTIONCALL",
          beforemsg = nil,
          aftermsg = nil,
165
166
167
168
169
170
171
          expressions = {
            "int_blocos",
            "dim_blocos",
          },
          variables = {
            "vals",
          },
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
          functionid = "testar_comunicacao",
        },
        xmin = 4060,
        ymin = 5080,
        xmax = 4260,
        ymax = 5200,
      },
      {
        type = "Foreach",
        description = nil,
        action = {
          _switch = "LISTITERATION",
          variable = "val",
          index = nil,
          list = "vals",
          listtype = "STRING",
        },
        xmin = 4060,
        ymin = 4880,
        xmax = 4260,
        ymax = 5000,
      },
      {
        type = "Command",
        description = "registra\n$parameters\n($object)",
        action = {
          _switch = "OBJECTCALL",
          beforemsg = nil,
          aftermsg = nil,
201
202
203
          expressions = {
            "val",
          },
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
          variables = {},
          classid = "registro",
          objname = "reg_tst",
          member = "registrar",
          operation = "call",
        },
        xmin = 4060,
        ymin = 4680,
        xmax = 4260,
        ymax = 4800,
      },
      {
        type = "Choice",
        description = nil,
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
222
223
224
          expressions = {
            "count > 0",
          },
225
          variables = {},
226
227
228
229
230
231
          types = {
            "BOOLEAN",
          },
          islist = {
            false,
          },
232
233
234
235
236
237
238
239
240
241
242
243
244
        },
        xmin = 4620,
        ymin = 4880,
        xmax = 4820,
        ymax = 5000,
      },
      {
        type = "Command",
        description = "$variable =\n$expressions",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
245
246
247
248
249
250
251
252
253
254
255
256
          expressions = {
            "num_testes or 1",
          },
          variables = {
            "count",
          },
          types = {
            "INTEGER",
          },
          islist = {
            false,
          },
257
258
259
260
261
262
263
264
265
266
267
268
269
        },
        xmin = 3780,
        ymin = 5280,
        xmax = 3980,
        ymax = 5400,
      },
      {
        type = "Command",
        description = "$variable =\n$expressions",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
270
271
272
273
274
275
276
277
278
279
280
281
          expressions = {
            "count - 1",
          },
          variables = {
            "count",
          },
          types = {
            "INTEGER",
          },
          islist = {
            false,
          },
282
283
284
285
286
287
288
289
290
291
292
293
294
        },
        xmin = 4340,
        ymin = 4880,
        xmax = 4540,
        ymax = 5000,
      },
      {
        type = "Command",
        description = "$name\n$parameters s",
        action = {
          _switch = "FUNCTIONCALL",
          beforemsg = nil,
          aftermsg = nil,
295
296
297
          expressions = {
            "int_testes or 10",
          },
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
          variables = {},
          functionid = "esperar",
        },
        xmin = 4340,
        ymin = 5080,
        xmax = 4540,
        ymax = 5200,
      },
      {
        type = "Choice",
        description = "$expressions?",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
313
314
315
          expressions = {
            "criar_reg",
          },
316
          variables = {},
317
318
319
320
321
322
          types = {
            "BOOLEAN",
          },
          islist = {
            false,
          },
323
324
325
326
327
328
329
330
331
332
333
334
335
        },
        xmin = 4060,
        ymin = 5280,
        xmax = 4260,
        ymax = 5400,
      },
    },
    Links = {
      {
        type = "Link",
        description = nil,
        from = 1,
        to = 2,
336
337
338
339
340
341
342
343
        x = {
          4440,
          4160,
        },
        y = {
          5340,
          5140,
        },
344
345
346
347
348
349
      },
      {
        type = "Link",
        description = nil,
        from = nil,
        to = 6,
350
351
352
353
354
355
356
357
        x = {
          3700,
          3880,
        },
        y = {
          5340,
          5340,
        },
358
359
360
361
362
363
      },
      {
        type = "Link",
        description = nil,
        from = 2,
        to = 3,
364
365
366
367
368
369
370
371
        x = {
          4160,
          4160,
        },
        y = {
          5140,
          4940,
        },
372
373
374
375
376
377
      },
      {
        type = "Link",
        description = "I",
        from = 3,
        to = 4,
378
379
380
381
382
383
384
385
        x = {
          4160,
          4160,
        },
        y = {
          4940,
          4740,
        },
386
387
388
389
390
391
      },
      {
        type = "Link",
        description = "F",
        from = 3,
        to = 7,
392
393
394
395
396
397
398
399
        x = {
          4160,
          4440,
        },
        y = {
          4940,
          4940,
        },
400
401
402
403
404
405
      },
      {
        type = "Link",
        description = nil,
        from = 7,
        to = 5,
406
407
408
409
410
411
412
413
        x = {
          4440,
          4720,
        },
        y = {
          4940,
          4940,
        },
414
415
416
417
418
419
      },
      {
        type = "Link",
        description = "V",
        from = 5,
        to = 8,
420
421
422
423
424
425
426
427
428
429
        x = {
          4720,
          4720,
          4440,
        },
        y = {
          4940,
          5140,
          5140,
        },
430
431
432
433
434
435
      },
      {
        type = "Link",
        description = nil,
        from = 8,
        to = 2,
436
437
438
439
440
441
442
443
        x = {
          4440,
          4160,
        },
        y = {
          5140,
          5140,
        },
444
445
446
447
448
449
      },
      {
        type = "Link",
        description = "V",
        from = 9,
        to = 1,
450
451
452
453
454
455
456
457
        x = {
          4160,
          4440,
        },
        y = {
          5340,
          5340,
        },
458
459
460
461
462
463
      },
      {
        type = "Link",
        description = "F",
        from = 9,
        to = 2,
464
465
466
467
468
469
470
471
        x = {
          4160,
          4160,
        },
        y = {
          5340,
          5140,
        },
472
473
474
475
476
477
      },
      {
        type = "Link",
        description = nil,
        from = 6,
        to = 9,
478
479
480
481
482
483
484
485
        x = {
          3880,
          4160,
        },
        y = {
          5340,
          5340,
        },
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
      },
    },
    Areas = {
    },
    Hidden = {
    },
  },
  {
    id = "TSTCOMM.ReadGroup",
    name = "TSTCOMM.ReadGroup",
    kind = "Flow",
    description = nil,
    isApplication = false,
    globals = {
      {
        name = "classid",
        type = "STRING",
        list = false,
        value = nil,
        comment = nil,
        is_arg = true,
        is_ret = false,
      },
      {
        name = "tags",
        type = "STRING",
        list = true,
        value = nil,
        comment = nil,
        is_arg = true,
        is_ret = false,
      },
      {
        name = "sync",
        type = "INTEGER",
        list = false,
        value = "0",
        comment = nil,
        is_arg = nil,
        is_ret = nil,
      },
      {
        name = "rets",
        type = "STRING",
        list = true,
        value = "{}",
        comment = nil,
        is_arg = false,
        is_ret = true,
      },
      {
        name = "RET_TMPL",
        type = "STRING",
        list = false,
        value = "\"%s [%s]: %s (%s)\"",
        comment = nil,
        is_arg = nil,
        is_ret = nil,
      },
    },
    errorFunction = nil,
    haltDiagram = nil,
    Nodes = {
      {
        type = "Foreach",
        description = nil,
        action = {
          _switch = "LISTITERATION",
          variable = "tag",
          index = nil,
          list = "tags",
          listtype = "STRING",
        },
        xmin = 4560,
        ymin = 5300,
        xmax = 4760,
        ymax = 5420,
      },
      {
        type = "Command",
        description = nil,
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
571
572
573
574
575
576
577
578
579
580
581
582
          expressions = {
            "sync+1",
          },
          variables = {
            "sync",
          },
          types = {
            "INTEGER",
          },
          islist = {
            false,
          },
583
584
585
586
587
588
589
590
591
592
593
594
595
        },
        xmin = 4560,
        ymin = 5100,
        xmax = 4760,
        ymax = 5220,
      },
      {
        type = "Command",
        description = nil,
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
596
597
598
599
600
601
602
603
604
605
606
607
          expressions = {
            "sync-1",
          },
          variables = {
            "sync",
          },
          types = {
            "INTEGER",
          },
          islist = {
            false,
          },
608
609
610
611
612
613
614
615
616
617
618
619
620
        },
        xmin = 4560,
        ymin = 4100,
        xmax = 4760,
        ymax = 4220,
      },
      {
        type = "Choice",
        description = "$expressions?",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
621
622
623
          expressions = {
            "sync == 0",
          },
624
          variables = {},
625
626
627
628
629
630
          types = {
            "BOOLEAN",
          },
          islist = {
            false,
          },
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
        },
        xmin = 4840,
        ymin = 5300,
        xmax = 5040,
        ymax = 5420,
      },
      {
        type = "Fork",
        description = nil,
        x = 4660,
        y = 4960,
        r = 40,
      },
      {
        type = "Command",
        description = "$name\n$parameters s",
        action = {
          _switch = "FUNCTIONCALL",
          beforemsg = nil,
          aftermsg = nil,
651
652
653
          expressions = {
            "1",
          },
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
          variables = {},
          functionid = "esperar",
        },
        xmin = 4840,
        ymin = 5100,
        xmax = 5040,
        ymax = 5220,
      },
      {
        type = "Command",
        description = "$results =\n$name\n$parameters",
        action = {
          _switch = "FUNCTIONCALL",
          beforemsg = nil,
          aftermsg = nil,
669
670
671
672
673
674
675
676
677
          expressions = {
            "classid",
            "tag",
          },
          variables = {
            "ok",
            "ret",
            "tipo",
          },
678
679
680
681
682
683
684
685
686
687
688
689
690
691
          functionid = "realizar_leitura_protegida",
        },
        xmin = 4560,
        ymin = 4700,
        xmax = 4760,
        ymax = 4820,
      },
      {
        type = "Command",
        description = "formata\n$variable",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
692
693
694
695
696
697
698
699
700
701
702
703
          expressions = {
            "string.format(RET_TMPL, tag, ok and 'ok' or 'erro', ret, tipo)",
          },
          variables = {
            "ret_txt",
          },
          types = {
            "STRING",
          },
          islist = {
            false,
          },
704
705
706
707
708
709
710
711
712
713
714
715
716
        },
        xmin = 4560,
        ymin = 4500,
        xmax = 4760,
        ymax = 4620,
      },
      {
        type = "Command",
        description = "$variable\n= $expressions",
        action = {
          _switch = "EXPRESSION",
          beforemsg = nil,
          aftermsg = nil,
717
718
719
720
721
722
723
724
725
726
727
728
          expressions = {
            "ret_txt",
          },
          variables = {
            "rets[#rets+1]",
          },
          types = {
            "STRING",
          },
          islist = {
            false,
          },
729
730
731
732
733
734
735
736
737
738
739
        },
        xmin = 4560,
        ymin = 4300,
        xmax = 4760,
        ymax = 4420,
      },
      {
        type = "Command",
        description = nil,
        action = {
          _switch = "EXPRESSION",
740
          beforemsg = "string.format(\"Iniciando leitura de bloco com %d itens...\", #tags)",
741
          aftermsg = nil,
742
743
744
745
746
747
748
749
750
751
752
753
          expressions = {
            "true",
          },
          variables = {
            "debug",
          },
          types = {
            "BOOLEAN",
          },
          islist = {
            false,
          },
754
755
756
757
758
759
760
761
762
763
764
765
766
        },
        xmin = 4280,
        ymin = 5100,
        xmax = 4480,
        ymax = 5220,
      },
    },
    Links = {
      {
        type = "Link",
        description = nil,
        from = 10,
        to = 1,
767
768
769
770
771
772
773
774
        x = {
          4380,
          4660,
        },
        y = {
          5160,
          5360,
        },
775
776
777
778
779
780
      },
      {
        type = "Link",
        description = "I",
        from = 1,
        to = 2,
781
782
783
784
785
786
787
788
        x = {
          4660,
          4660,
        },
        y = {
          5360,
          5160,
        },
789
790
791
792
793
794
      },
      {
        type = "Link",
        description = "F",
        from = 1,
        to = 4,
795
796
797
798
799
800
801
802
        x = {
          4660,
          4940,
        },
        y = {
          5360,
          5360,
        },
803
804
805
806
807
808
      },
      {
        type = "Link",
        description = "F",
        from = 4,
        to = 6,
809
810
811
812
813
814
815
816
        x = {
          4940,
          4940,
        },
        y = {
          5360,
          5160,
        },
817
818
819
820
821
822
      },
      {
        type = "Link",
        description = nil,
        from = 6,
        to = 4,
823
824
825
826
827
828
829
830
831
832
833
834
        x = {
          4940,
          4800,
          4800,
          4940,
        },
        y = {
          5160,
          5160,
          5260,
          5360,
        },
835
836
837
838
839
840
      },
      {
        type = "Link",
        description = nil,
        from = 2,
        to = 5,
841
842
843
844
845
846
847
848
        x = {
          4660,
          4660,
        },
        y = {
          5160,
          4960,
        },
849
850
851
852
853
854
      },
      {
        type = "Link",
        description = nil,
        from = 5,
        to = 7,
855
856
857
858
859
860
861
862
        x = {
          4660,
          4660,
        },
        y = {
          4960,
          4760,
        },
863
864
865
866
867
868
      },
      {
        type = "Link",
        description = nil,
        from = 7,
        to = 8,
869
870
871
872
873
874
875
876
        x = {
          4660,
          4660,
        },
        y = {
          4760,
          4560,
        },
877
878
879
880
881
882
      },
      {
        type = "Link",
        description = nil,
        from = 8,
        to = 9,
883
884
885
886
887
888
889
890
        x = {
          4660,
          4660,
        },
        y = {
          4560,
          4360,
        },
891
892
893
894
895
896
      },
      {
        type = "Link",
        description = nil,
        from = 9,
        to = 3,
897
898
899
900
901
902
903
904
        x = {
          4660,
          4660,
        },
        y = {
          4360,
          4160,
        },
905
906
907
908
909
910
      },
      {
        type = "Link",
        description = nil,
        from = nil,
        to = 10,
911
912
913
914
915
916
917
918
        x = {
          4380,
          4380,
        },
        y = {
          5360,
          5160,
        },
919
920
921
922
923
924
925
926
927
928
      },
    },
    Areas = {
    },
    Hidden = {
    },
  },
}

Dependencies = {
929
  "lib-list-1_10.mpam",
930
  "lib-log-2_3.mpam",
931
932
  "lib-time-1_2.mpam",
}