Header menu logo issie

BusWire Module

Types and nested modules

Type/Module Description

Constants

WireRenderProps

Type passed to wire renderer functions. The data here is cached by React and if the same as last time the render function itself is not called.

Functions and values

Function or value Description

extractConnection wModel cId

Full Usage: extractConnection wModel cId

Parameters:
Returns: Connection

This function is given a ConnectionId and it converts the corresponding BusWire.Wire type to a Connection type, offering an interface between our implementation and Issie.

wModel : Model
cId : ConnectionId
Returns: Connection

extractConnections wModel

Full Usage: extractConnections wModel

Parameters:
Returns: Connection list

This function is given a list of ConnectionId and it converts the corresponding BusWire.Wire(s) to a list of Connections, offering an interface between our implementation and Issie.

wModel : Model
Returns: Connection list

formatIntersectionMap m

Full Usage: formatIntersectionMap m

Parameters:
Returns: string

Formats an intersection map for logging purposes.

m : Map<SegmentId, (ConnectionId * SegmentId) list>
Returns: string

formatSegmentId (arg1, arg2)

Full Usage: formatSegmentId (arg1, arg2)

Parameters:
Returns: string

Formats a SegmentId for logging purposes.

arg0 : int
arg1 : ConnectionId
Returns: string

formatWireId id

Full Usage: formatWireId id

Parameters:
Returns: string

Formats a WireId for logging purposes

id : ConnectionId
Returns: string

formatXY xy

Full Usage: formatXY xy

Parameters:
Returns: string

Formats an XYPos for logging purposes.

xy : XYPos
Returns: string

getASegmentFromId model (arg2, arg3)

Full Usage: getASegmentFromId model (arg2, arg3)

Parameters:
Returns: ASegment
Modifiers: inline
model : Model
arg1 : int
arg2 : ConnectionId
Returns: ASegment

getFixedCoord aSeg

Full Usage: getFixedCoord aSeg

Parameters:
Returns: float
Modifiers: inline

Get the coordinate fixed in an ASegment. NB - ASegments can't be zero length

aSeg : ASegment
Returns: float

getSegmentFromId model (arg2, arg3)

Full Usage: getSegmentFromId model (arg2, arg3)

Parameters:
Returns: Segment
Modifiers: inline
model : Model
arg1 : int
arg2 : ConnectionId
Returns: Segment

getSegmentOrientation segStart segEnd

Full Usage: getSegmentOrientation segStart segEnd

Parameters:
Returns: Orientation
Modifiers: inline

Given a segment start and end position, finds the orientation of the segment. Fails if the segment is neither horizontal nor vertical

segStart : XYPos
segEnd : XYPos
Returns: Orientation

getSegmentOrientationOpt segStart segEnd

Full Usage: getSegmentOrientationOpt segStart segEnd

Parameters:
Returns: Orientation option
Modifiers: inline

Given a segment start and end position, finds the orientation of the segment. Returns None if the segment is 0 length

segStart : XYPos
segEnd : XYPos
Returns: Orientation option

getWireOutgoingEdge wire

Full Usage: getWireOutgoingEdge wire

Parameters:
Returns: Edge
Modifiers: inline

Given a segment start and end position, finds the symbol edge of the segment based on its segment direction if it starts an outgoing wire.

wire : Wire
Returns: Edge

issieVerticesToSegments connId verticesList

Full Usage: issieVerticesToSegments connId verticesList

Parameters:
    connId : ConnectionId
    verticesList : (float * float * bool) list

Returns: Segment list

Convert a (possibly legacy) issie Connection stored as a list of vertices to a list of segments

connId : ConnectionId
verticesList : (float * float * bool) list
Returns: Segment list

logConnectionId id

Full Usage: logConnectionId id

Parameters:
Returns: ConnectionId

Logs the given ConnectionId and returns it unchanged. Used for debugging.

id : ConnectionId
Returns: ConnectionId

logIntersectionMaps model

Full Usage: logIntersectionMaps model

Parameters:
Returns: Model

Logs the intersection maps of a given model and returns it unchanged. Used for debugging

model : Model
Returns: Model

logSegment seg

Full Usage: logSegment seg

Parameters:
Returns: Segment

Logs the given Segment and returns it unchanged. Used for debugging.

seg : Segment
Returns: Segment

logSegmentId seg

Full Usage: logSegmentId seg

Parameters:
Returns: string
seg : Segment
Returns: string

logSegmentInModel model wireId index

Full Usage: logSegmentInModel model wireId index

Parameters:

Tries to find and log a segment identified by index in a wire identified by wireId in the current model. Assumes wireId can be found in the current model. Returns unit, used for debugging.

model : Model
wireId : ConnectionId
index : int

logSegmentsInModel model wireSegmentIdPairs

Full Usage: logSegmentsInModel model wireSegmentIdPairs

Parameters:
Returns: Model

Tries to find and log each segment to its corresponding wire identified in wireSegmentIdPairs in the current model. Returns the model unchanged. Used for debugging.

model : Model
wireSegmentIdPairs : (int * ConnectionId) list
Returns: Model

logWire wire

Full Usage: logWire wire

Parameters:
Returns: Wire

Logs the given wire and returns it unchanged. Used for debugging.

wire : Wire
Returns: Wire

makeInitialSegmentsList hostId startPos endPos portOrientation

Full Usage: makeInitialSegmentsList hostId startPos endPos portOrientation

Parameters:
Returns: Segment list

Given the coordinates of two port locations that correspond to the endpoints of a wire, as well as the orientation of the final port this function returns a list of Segment(s). The starting segment will always be from a Right Edge (and so in increasing X direction)

hostId : ConnectionId
startPos : XYPos
endPos : XYPos
portOrientation : Edge
Returns: Segment list

makeInitialWireVerticesList wireStartPos wireEndPos portOrientation

Full Usage: makeInitialWireVerticesList wireStartPos wireEndPos portOrientation

Parameters:
Returns: XYPos list

Given the coordinates of two port locations that correspond to the endpoints of a wire, as well as the final port orientation this function returns a list of wire vertices. The starting segment will always be from a Right Edge (and so in increasing X direction)

wireStartPos : XYPos
wireEndPos : XYPos
portOrientation : Edge
Returns: XYPos list

renderJumpSegment a

Full Usage: renderJumpSegment a

Parameters:
Returns: string list
a : ASegment
Returns: string list

renderJumpWire props

Full Usage: renderJumpWire props

Parameters:
Returns: ReactElement

Function used to render a single wire if the display type is jump

props : WireRenderProps
Returns: ReactElement

renderModernWire props

Full Usage: renderModernWire props

Parameters:
Returns: ReactElement
props : WireRenderProps
Returns: ReactElement

renderRadialWire props

Full Usage: renderRadialWire props

Parameters:
Returns: ReactElement

Function used to render a single wire if the display type is radial

props : WireRenderProps
Returns: ReactElement

renderRadialWireSVG (arg1, arg2) segmentpair

Full Usage: renderRadialWireSVG (arg1, arg2) segmentpair

Parameters:
    arg0 : string
    arg1 : Orientation
    segmentpair : (type)

Returns: string * Orientation

Creates the SVG command string required to render the wire (apart from the final "nub") with a radial display type

arg0 : string
arg1 : Orientation
segmentpair : (type)
Returns: string * Orientation

renderWireWidthText props

Full Usage: renderWireWidthText props

Parameters:
Returns: ReactElement
props : WireRenderProps
Returns: ReactElement

view model dispatch

Full Usage: view model dispatch

Parameters:
    model : Model
    dispatch : Dispatch<Msg>

Returns: ReactElement

Function that will render all of the wires within the model, with the display type being set in Model.Type

model : Model
dispatch : Dispatch<Msg>
Returns: ReactElement

xyVerticesToSegments connId xyVerticesList

Full Usage: xyVerticesToSegments connId xyVerticesList

Parameters:
Returns: Segment list

Converts a list of vertices into a list of segments

connId : ConnectionId
xyVerticesList : XYPos list
Returns: Segment list

Type something to start searching.