Please complete the required studio exercises listed below, along with the (optional) enrichment exercises if they interest you.
As you work through the exercises, please record your answers in a file, and upon completion please send e-mail with your answers to the firstname.lastname@example.org account with subject line Component Configurator studio.
Please make sure that the name of each person who worked on these exercises is listed at the top of your reply message, and that you number your answers so they are easy for us to match up with the appropriate exercise.
Visual Studio 2013 is not successfully compiling ACE on the Windows machines in Urbauer 218, so you should please use Visual Studio 2012 for this studio (and for subsequent studios and for the lab 3 assignment).
ACE_Service_Objectclass (either directly or through multiple levels of inheritance, possibly via another ACE class that is derived from it. As the answer to this exercise please name the most derived ACE class along the inheritance path from
ACE_Service_Objectto each of your client-side service handler classes.
cout(in a thread-safe manner if and as necessary). Compile and run your client code, and as the answer to this exercise show one of the lists of service handler labels and addresses.
cinand if the line is a recognizable command, enacts it. The code for this feature should run concurrenctly with the other client code, by wrapping it within a reactively dispatched service handler, an active object, or both, and should interact with other client-side objects in a thread-safe manner as needed.
Implement handling for a command of the form
rename <address> <label>, where
<address> is a hexadecimal number and
<label> is a string of
characters with no intervening spaces. When that command is given to the client program's standard input,
the user interface should first look up whether an object having the address given by the hexadecimal
number is found in the data structure you implemented in the previous exercise. If so it should replace
the label for that service handler and again print out the list of handler labels and addresses. If not
it should issue an appropriate error message (to
cout, again in a thread-safe
manner). As the answer to this exercise please show output of your programs that demonstrates this
infomethods in your service handlers (e.g., according to the description of the
ACE_Service_Objectinterface given in Section 5.2 of the C++NPV2 textbook). In particular, each service object should maintain a variable that records its current status (running, suspended, etc.) which should be printed out by the
infomethod and also may affect the applicability or behavior of various methods (and their commands described next).
Implement corresponding commands in your user interface which are enacted by calling the appropriate method on the appropriate service handler object. Those commands should allow objects to be referred to either by their labels, though optionally you may also support commands referring to objects by their addresses. Build and run your client code, and as the answer to this exercise please (1) summarize how you implemented each of the commands, and (2) show representative output demonstrating the use of each command.
cinbased user interface. As the answer to this exercise please summarize the changes you made and show a fragment of the output produced by each of the different commands.
Modify the client and server so that if a command for the other is received on one it passes it along to the other, and if a command addressed to it is received (either from the local user interface or from the other side) it is enacted. As the answer to this exercise please summarize the changes you made and show a fragment of the output produced by each of the different commands.