Documentation ¶
Overview ¶
Package disp is for dispatching and displaying trice log lines. This file contains the client code.
Package disp is for dispatching and displaying trice log lines. This file contains the server code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // IPAddr is the display server ip addr IPAddr = "localhost" // default value for testing // IPPort is the display server ip addr IPPort = "61497" // default value for testing // ColorPalette is the used PC color set. It is initialized with its default value inside the appropriate subcommand. ColorPalette = "off" // default value for testing )
var (
// Out is an exported function pointer, which can be redirected for example to a client call
Out = out
)
var ( // PtrRPC is a pointer for remote calls valid after a succesful rpc.Dial() PtrRPC *rpc.Client )
Functions ¶
func Connect ¶
func Connect() error
Connect is called by the client and tries to dial. On success PtrRpc is valid afterwards and zhe output is re-directed
func RemoteOut ¶
RemoteOut does send the logstring s to the displayServer It is replacing emit.Out when trice acts as remote
func ScDisplayServer ¶
func ScDisplayServer() error
ScDisplayServer is the endless function called when trice tool acts as remote display. All in Server struct registered RPC functions are reachable, when displayServer runs.
func ScShutdownRemoteDisplayServer ¶
ScShutdownRemoteDisplayServer starts a client to send shutdown message to display server
func StartServer ¶
func StartServer(exe string)
StartServer starts a display server with the filename exe (if not already running)
Types ¶
type Server ¶
type Server struct{}
Server is the RPC struct for registered server dunctions
func (*Server) ColorPalette ¶
ColorPalette is the exported server function for color palette, if trice tool acts as display server. By declaring it as a Server struct method it is registered as RPC destination.
func (*Server) LogSetFlags ¶
LogSetFlags is called remotely to shutdown display server