Studio:AutoScript Messages

From STRIDE Wiki
Revision as of 20:57, 9 July 2008 by Chrisj (talk | contribs)
Jump to navigation Jump to search

There are several types of messaging performed by STRIDE. These include:

Broadcast Messaging

Broadcast messaging is used to have a message owner broadcast messages. A message user will subscribe to a message for a time. The message user will receive messages until the message user's script exits or until it unsubscribes from the message. The exact process for how this is achieved is as follows:

1. A Message User calls Subscribe() to register that it is interested in receiving message events from a given message.
2. When the Message Owner calls Broadcast(), a message event is sent to all Subscribers of the message. The message event received by the Message User is enqueued to its script's event queue. The Message User may then evaluate the messages it has received by making calls to WaitForEvent().
3. When a Message User no longer wishes to receive message events from a given message, it will call Unsubscribe() to unregister its interest in receiving events.

For a broadcast message (a message whose ascript.Messages.Item().Type is "BroadcastMessage"):

  • Its owner (ascript.Messages.Item().Owner) will have a Broadcast method.
  • Its user object (ascript.Messages.Item().User) will have a Subscribe method and an Unsubscribe method.
  • These are the only methods available for this message type. Thus other message methods (e.g. Register/Unregister) will not be available.

Command/Response Messaging

The other form of messaging provided by STRIDE involves direct messaging between a host and target. There are three types of direct messaging between host and target and they depend upon what information is being passed in which direction.

Member
Type
Description
One-Way Command Messaging
One-Way Response Messaging
Two-Way Command/Response Messaging

One-Way Command Messaging

One-Way Response Messaging

Two-Way Command/Response Messaging