Generic Message Processor Example
Here is a simple IPC message processor, built using the phoIPC sublist processing functions. The message processor requires the following five arguments:
-
cv: Cellview in which the objects specified in the message need to be created. -
msg: Message containing the sublists. It must be formatted as specified in the Standard phoIPC Message Format. -
designIntentLayer: Default waveguide layer. -
dropPort: Boolean value, if set tonil, the electrical or optical port is not created.dropPortcan be used when creating a hierarchical Pcell, where the lower-level ports are not used by the tool, and therefore, can be skipped (or dropped) for improved performance. -
portMap: List representing the port mapping information.procedure( myMsgProc( cv msg designIntentLayer dropPorts portMap)
let( (polygons ports markers)
; get the relevant parts from the server message
polygons = car(msg)
ports = cadr(msg)
markers = caddr(msg)
; send each one to the appropriate default processor
phoIPCProcessShapes( cv polygons portMap)
phoIPCProcessPorts( cv ports portMap)
phoIPCProcessMarkers(cv markers "My IPC Tool")
)
)
Let us consider the following example that demonstrates the use of some functions described in this chapter. The code snippet displayed below is part of a Pcell code block and it illustrates at a high-level how the various phoIPC functions can be used.
; make sure the communication is open for the"phoIPCSample"processor
when( phoIPCServerCheck("phoIPCSample"pcCellView)
The server is started and working.
msg =
Calls the IPC server and gets the message back.
portMap =
Creates a portMap, if required.
phoIPCProcessServerMessage(pcCellView"waveguide"msg nil portMap)
) ; done
Creates the objects in the submaster.
Related Topics
Server Registration and Check Functions
Standard phoIPC Message Format
Return to top