SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 114 | Next

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

"Model-Based Software Testing and Analysis with C#"

Send;
}
// continued ...
Figure 5.8. Remote instrument client/server: model program (part 2).
78 Model Programs
// ... continued
public static bool ServerSendEnabled()
{
return (serverSocket == Socket.Connected
&& phase == Phase.Send);
}
// Parameter here, server can send different temperatures
[Action]
public static void ServerSend([Domain("Temperatures")] double datum)
{
clientBuffer = datum;
phase = Phase.ClientReceive;
}
// Domain for ServerSend parameter t
static Set Temperatures()
{
return new Set(Temp2, Temp3);
}
public static bool ServerCloseConnectionEnabled()
{
return (serverSocket == Socket.Connected);
}
[Action]
public static void ServerCloseConnection()
{
serverSocket = Socket.Disconnected;
}
public static bool ServerCloseEnabled()
{
return (serverSocket != Socket.None
&& serverSocket != Socket.Connected
&& serverSocket != Socket.Closed);
}
[Action]
public static void ServerClose()
{
serverSocket = Socket.Closed;
}
// continued ...
Figure 5.9. Remote instrument client/server: model program (part 3).
Systems with Finite Models 79
// ... continued
// Client enabling conditions and actions
public static bool ClientSocketEnabled()
{
return (clientSocket == Socket.None);
}
[Action]
public static void ClientSocket()
{
clientSocket = Socket.Created;
}
public static bool ClientConnectEnabled()
{
return (clientSocket == Socket.


Pages:
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
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6