remote HID protocol, high level

reference

ver(protver)

Sends the protocol version the server will speak. If the client doesn't support that version, it should break the connection.

Arguments:

unit(abbrev)

Sends the coordinate unit used in subsequent communication. This is not necessarily the unit used for displaying values on the user interface, but the unit used to interpret numeric coordinate values sent in commands.

Arguments:

ready()

Informs the client that the server is ready to start the session. The client needs to answer with a Ready() message before the server proceeds.

Arguments: none.

brddim(w h)

Announce board dimensions. Some layers may extend beyond the board.

Arguments:

inval(x1 x2 y1 y2)

Invalidate a rectangular section of the screen; the client should redraw this area. Clients implementing their own mechanism to keep track on drawing are free to ignore these requests

Arguments:

inval()

Same as inval(x1 x2 y1 y2) but invalidates the whole screen.

Arguments: none

newly(name id flags groups)

Inform the client that the next set of drawing commands are for a specific layer.

Arguments:

Example:

newly(bottomassembly 16777226 ((bottom) (assy) (virtual)) -1)
Creates the bottom assembly virtual layer with ID 16777226. It is not part of any layer group and is called "bottomassembly".

setlg(group_id group_flags is_empty)

Inform the client that the next set of drawing commands are for a specific layer group.

Arguments:

makeGC()

Request the client to make a new graphical context. The client should allocate a GC and return an integer ID using the MadeGC(ID) message. The ID uniquely identifies the GC; it should be small positive integer (between 0 and 31 for now).

Arguments: none

delGC(ID)

Inform the client that a given GC is not needed anymore. The server will not reference the GC again and the GC can be destroyed (but graphics drawn on the screen should not be affected). The ID may be reused by the client in a subsequent madeGC() message).

Arguments:

clr(gci colorstring)

Change the color subsequent drawing commands of a given GC will use.

Arguments:

cap(gci style)

Set the line ending cap style. Note: the cap extends half-line-width beyond the end coordinates, e.g. the end point of a line is the center of the round-cap circle.

Arguments:

linwid(gci width)

Sets line width (pen tip diameter).

Arguments:

setxor(gci state)

Sets whether to perform "xor-drawing" for subsequent drawing commands in the selected GC.

Arguments:

line(gci x1 y1 x2 y2)

Draw a line using the current GC. The line inherits line width, color and cap style from the GC.

Arguments:

rect(gci x1 y1 x2 y2 filled)

Draw a rectangle. The rectangle inherits only color from the GC.

Arguments:

fcirc(gci cx cy r)

Draw a filled circle. The circle inherits only color from the GC.

Arguments:

poly(gci len ptlist)

Draw a filled polygon. The polygon inherits only color from the GC.

Arguments:

umask(m)

"use mask" m. The server uses this message to make an announcement before it starts drawing certain things.

Arguments: