• IP addresses are NOT logged in this forum so there's no point asking. Please note that this forum is full of homophobes, racists, lunatics, schizophrenics & absolute nut jobs with a smattering of geniuses, Chinese chauvinists, Moderate Muslims and last but not least a couple of "know-it-alls" constantly sprouting their dubious wisdom. If you believe that content generated by unsavory characters might cause you offense PLEASE LEAVE NOW! Sammyboy Admin and Staff are not responsible for your hurt feelings should you choose to read any of the content here.

    The OTHER forum is HERE so please stop asking.

Example - Incorporating an Order System for an Eatery

ChioCS

Advertiser
Moderator
In the earlier example, we show you how you can create a third party program to pick up objects that are created in Noticeboard and play it's animation. It also shows how you can receive commands through the console.

In this example, it will show you how you can create an order system by capturing the details of the touches, either through a file or obtaining directly from Noticeboard through Named Pipes.

[size=+1]What you need[/size]
For creating a shopping order, you need to create the NoticeBoard project files and the third party program. For the Noticeboard project, it a a single Search Group project with a collection of project files.

[size=+1]Configuration[/size]

To keep it simple, we have a single display window for the shop owner and the rest of the screen to be divided and setup as Host windows. Therefore, except for the "owner" ntb, all the other ntb projects need to target the Host (Search Group) address.


Setting up the linkages

In order to communicate, you must indicate the third party program name in the "Project Rules" and the xml output filename to update. This should be defined in the "Search Group" (eatery.ntb) as in this example. Although for each "Owner" you can setup one link for each third party program.

To run the third party program, create a Window with type "External" (order.ntb) and drop your executable or write out the name of the program.




[size=+1]Communication[/size]

First, in the third party program, you setup a NamedPipe as client to the server with an id "NoticeBoard_"+your_process_id. And setup an asynchronous wait on the pipe for message from the server.

As of now, there are 4 primary commands from the server, they are:

Bound=0,0,1024,768 (The position and size of the window that you are suppose to set)
Action=Show (Show your window)
Action=Hide (Hide your Window)
Action=Stop (Do any winding down operation and terminate your process)

Other commands are:

Action=Update A_Xml_Document_string (Containing the new Touch Details where you should add)
Action=Remove A_Xml_Document_string (Containing the same Touch Details to remove)

[size=+1]Setting up the Touches[/size]

In this example, we show you 3 different ways to setup the touches (alacarte.ntb, set.ntb and bowl.ntb). Directly or indirectly, the basis is the same as shown in the diagram below.

eatery5.jpg


Here's the source program - Order.zip

And the Eatery project files - Eatery.zip

Here's the screen shot.

eatery1.jpg
 
Last edited:
Top