disp

package
v0.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package disp is for dispatching and displaying trice log lines

Index

Constants

This section is empty.

Variables

View Source
var (
	// IpAddr is the display server ip addr
	IpAddr string = "localhost" // default value for testing

	// IpPort is the display server ip addr
	IpPort string = "61497" // default value for testing

	// Visualize is an exported function pointer, which can be redirected for example to a client call
	Out = out

	// PtrRpc is a pointer
	PtrRpc *rpc.Client
)
View Source
var (
	// ColorPalette is the used PC color set. It is initialized with its default value inside the appropriate subcommand.
	ColorPalette = "off" // default value for testing

)

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

func RemoteOut(s []string) error

RemoteOut does send the logstring s to the displayServer It is replacing emit.Visuaize when trice acts as remote

func ScServer

func ScServer() error

ScServer 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 StartServer

func StartServer()

StartServer starts a display server (if not already running)

func StopServer

func StopServer()

StopServer sends signal to display server to quit

Types

type Server

type Server struct{}

Server is the RPC struct for registered server dunctions

func (*Server) ColorPalette

func (p *Server) ColorPalette(s []string, reply *int64) error

Color 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) Exit

func (p *Server) Exit([]int64, *int64) error

Adder is a demo for a 2nd function

func (*Server) Out

func (p *Server) Out(s []string, reply *int64) error

Out is the exported server function for string display, if trice tool acts as display server. By declaring it as a Server struct method it is registered as RPC destination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL