|
AlT Beginner
Joined: 11 Jun 2003 Posts: 22 Location: Moldova
|
Posted: Mon Aug 25, 2003 9:43 am
Problems with MultiState triggers. |
I need to parse a multiline output of a command identifying items.
All lines have unique pattern to match, so there are no bit problem setting up a multistate trigger. However there might be lines which might or might not be present. For example.
Line1 always present
Line2 always present
Line3 might be present
Line4 always present
Line5 might be present
Line6 might be present
Line7 always present
Okay. Now the 3rd line is easily matched or passed over with setting in the state options "LoopLines = 1". However for the 5th and 6th line the trick not working, when BOTH lines are missing. I've tried to set LoopLines 1 or 2 however it's not working. The trigger stops parsing at Line7.
And note please that i need this trigger to be a multistate trigger. I din't need to have 7 different triggers doing that, cause execution of several states depends on the output from the previous states.
Any help please? How two consecutive lines can be parsed or skipped over using a multistate? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Aug 26, 2003 2:40 am |
I found multi-state triggers to be quite limited in memory. On average, for me that limit shows up after 4 states if each state does any significant parsing. Any more than that and ZMud simply doesn't process the subsequent states and possibly gives up on the entire trigger (it's been a while since I had to make such a large trigger). It's definitely not a big deal, since I could always make a second multi-state trigger to pick up where the first one left off.
As for your situation, you probably don't want to use a single multi-state to match EVERY line. You can use one to match lines 1, 2, 4, and 7, and use single-state triggers to match the iffy lines. |
|
|
|
AlT Beginner
Joined: 11 Jun 2003 Posts: 22 Location: Moldova
|
Posted: Tue Aug 26, 2003 9:23 am |
Well, your advice would help of course, if not the case that i need rely on the output from previous states, in following state.
For example state 3 have very complex processing which takes about 1,5 - 2 seconds to complete. And i need that output in state 4. If i make a stand-alone trigger for state 4 it will fire before state 3 in multistate will be finished. And even if i do just two separate triggers for state 3 and 4 it will not help. Cause trigger4 will be fired before trigger3 will be finished and i need the output from 3 in 4.
As far as i understand the multistate triggers can do it easily because it don't advance to the next state until previous is completed? Am i right? |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|