Вверх ↑
Ответов: 693
Рейтинг: 7
#1: 2019-01-19 02:30:54 ЛС | профиль | цитата
Разнес на 2 приложения. При первом рассмотрении задача решена. Это вообще законно?

Первичный модуль соединений (принимает данные от TCP безотложно в очередь)
Add(MainForm,4026477,266,105)
{
Caption="Первичный модуль соединений"
link(onCreate,3797376:doWork2,[(305,125)(305,34)])
}
Add(Thread,1595303,434,126)
{
@Hint=#45:Данные из TCP с безотложной записью в очередь|
Delay=100
link(onExec,10709922:doNext,[])
AddHint(2,42,33,13,Delay)
AddHint(-76,-40,177,26,@Hint)
}
Add(SafeMode,15768141,595,133)
{
Name="CritSection1"
link(onSafeMode,4481401:doPush,[])
AddHint(-34,37,72,13,Name)
}
Add(SafeMode,15450595,609,224)
{
Name="CritSection1"
link(onSafeMode,4481401:doPop,[(648,230)(648,146)])
AddHint(-29,40,72,13,Name)
}
Add(CounterEx,10709922,483,126)
{
Max=100000
link(onNext,4962318:doEvent1,[])
}
Add(Hub,15325505,357,119)
{
OutCount=4
link(onEvent1,12421006:doWork3,[(382,125)(382,97)(270,97)])
link(onEvent3,2721350:doWork2,[])
link(onEvent4,3631004:doStart,[(382,146)(382,216)(375,216)(375,230)])
}
Add(TimeCounter,13546177,595,70)
{
Precision=1
}
Add(Hub,4962318,525,126)
{
OutCount=4
link(onEvent1,13546177:doStart,[(550,132)(550,76)])
link(onEvent2,15768141:doSafeMode,[])
link(onEvent3,13546177:doStop,[(564,146)(564,83)])
link(onEvent4,9557811:doSynchronize,[(634,153)(634,83)])
}
Add(Stack,4481401,679,133)
{
Point(onEmpty)
link(onPop,8167724:doSend,[(718,146)(718,13)(445,13)(445,27)])
link(onEmpty,4570908:doWork2,[(725,153)(725,62)])
}
Add(IndexToChanel,16082010,518,224)
{
Point(Index)
link(onEvent1,6659850:doEvent1,[(557,230)(557,223)])
link(Index,3065838:State,[])
}
Add(Switch,3065838,518,168)
{
DataOn=Integer(0)
DataOff=Integer(1)
Default=0
Point(State)
Point(doOn)
}
Add(Thread,3631004,385,224)
{
Delay=120
link(onExec,13807543:doSafeMode,[])
AddHint(-47,44,33,13,Delay)
}
Add(SafeMode,4541376,567,21)
{
Name="CritSection2"
link(onSafeMode,4570908:doWork1,[(606,27)])
AddHint(55,10,72,13,Name)
}
Add(SafeMode,13807543,441,224)
{
Name="CritSection2"
WaitMode=1
link(onSafeMode,16082010:doEvent,[])
AddHint(-44,70,72,13,Name)
}
Add(Hub,6659850,574,217)
{
link(onEvent1,3065838:doReset,[(599,223)(599,209)(501,209)(501,181)])
link(onEvent2,15450595:doSafeMode,[])
}
Add(PipeClient,8167724,455,21)
{
PipeName="my"
Point(onErrorConnect)
link(onReceive,4541376:doSafeMode,[])
link(onConnect,15325505:doEvent1,[(494,41)(494,83)(347,83)(347,125)])
link(onErrorConnect,3091951:doDeferredEvent,[])
}
Add(Button,6411623,196,35)
{
Left=20
Top=15
Width=135
Caption="Генерировать 3 сек"
link(onClick,13392823:doEvent1,[])
}
Add(Button,3278153,196,70)
{
Left=20
Top=50
Width=135
Caption="Пауза"
link(onClick,8731543:doWork2,[])
}
Add(HubEx,2721350,385,133)
{
link(onEvent,1595303:doStart,[(396,139)(396,132)])
}
Add(HubEx,4570908,602,56)
{
Angle=2
link(onEvent,3065838:doOn,[(508,62)(508,188)])
}
Add(Synchronize,9557811,756,77)
{
link(onSync,5990075:doText,[])
}
Add(Label,5990075,812,77)
{
Left=175
Top=20
Caption="Количество"
}
Add(HubEx,3797376,427,28)
{
link(onEvent,8167724:doConnect,[])
}
Add(DeferredEvent,3091951,504,49)
{
Delay=1000
link(onDeferredEvent,3797376:doWork3,[(543,55)(543,69)(431,69)])
}
Add(Timer,13611684,280,42)
{
Enable=1
AutoStop=3
link(onTimer,8731543:doWork1,[(333,48)])
}
Add(Hub,13392823,245,35)
{
link(onEvent1,2721350:doWork1,[(389,41)])
link(onEvent2,12421006:doWork2,[])
}
Add(HubEx,8731543,329,70)
{
link(onEvent,1595303:doStop,[(403,76)(403,139)])
}
Add(HubEx,12421006,266,42)
{
link(onEvent,13611684:doTimer,[])
}


Основная обработка очереди
Add(MainForm,2953706,21,105)
{
Caption="Основная обработка очереди"
link(onCreate,9654003:doStartServer,[(60,125)(60,104)])
}
Add(Label,14925684,686,266)
{
Left=80
Top=155
Width=10
Height=17
Caption="0"
}
Add(Timer,11906121,329,259)
{
Interval=30
link(onTimer,5810077:doCompare,[])
AddHint(-25,50,27,13,Interval)
}
Add(For,16666201,609,266)
{
@Hint=#17:Тестовая нагрузка|
End=1000
link(onEvent,14925684:doText,[])
AddHint(0,45,112,13,@Hint)
}
Add(Memory,13238423,434,175)
{
Default=String(obrabotano)
}
Add(Hub,2650613,483,259)
{
OutCount=4
link(onEvent1,13987857:doData,[(508,265)(508,237)])
link(onEvent2,16666201:doFor,[])
link(onEvent3,10709922:doNext,[])
link(onEvent4,9654003:doSendAll,[(508,286)(508,300)(186,300)(186,125)])
}
Add(StrMask,5810077,434,259)
{
Mask="obrabotano"
link(onFalse,2650613:doEvent1,[])
link(Str,13238423:Value,[])
}
Add(HubEx,1814196,406,175)
{
link(onEvent,13238423:doValue,[])
}
Add(DoData,13987857,518,231)
{
Data=String(obrabotano)
link(onEventData,1814196:doWork3,[(557,237)(557,223)(410,223)])
}
Add(PipeServer,9654003,196,91)
{
PipeName="my"
AsyncEvents=0
Point(doSendAll)
link(onReceive,1814196:doWork2,[(242,97)(242,181)])
}
Add(Label,5437382,588,350)
{
Left=80
Top=130
Caption="Количество"
}
Add(CounterEx,10709922,525,273)
{
Max=100000
link(onNext,5437382:doText,[(578,279)(578,356)])
}

карма: 0

0
Редактировалось 1 раз(а), последний 2019-01-19 02:33:56