|
|
@ -118,34 +118,26 @@ type TimeSignal struct {
|
|
|
|
time time.Time
|
|
|
|
time time.Time
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func NewDownSignal(source GraphNode, _type string) (BaseSignal) {
|
|
|
|
func NewBaseSignal(source GraphNode, _type string, downwards bool) BaseSignal {
|
|
|
|
source_id := ""
|
|
|
|
source_id := ""
|
|
|
|
if source != nil {
|
|
|
|
if source != nil {
|
|
|
|
source_id = source.ID()
|
|
|
|
source_id = source.ID()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
signal := BaseSignal{
|
|
|
|
signal := BaseSignal{
|
|
|
|
downwards: true,
|
|
|
|
downwards: downwards,
|
|
|
|
source: source_id,
|
|
|
|
source: source_id,
|
|
|
|
_type: _type,
|
|
|
|
_type: _type,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return signal
|
|
|
|
return signal
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func NewSignal(source GraphNode, _type string) (BaseSignal) {
|
|
|
|
func NewDownSignal(source GraphNode, _type string) BaseSignal {
|
|
|
|
source_id := ""
|
|
|
|
return NewBaseSignal(source, _type, true)
|
|
|
|
if source != nil {
|
|
|
|
}
|
|
|
|
source_id = source.ID()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signal := BaseSignal{
|
|
|
|
|
|
|
|
downwards: false,
|
|
|
|
|
|
|
|
source: source_id,
|
|
|
|
|
|
|
|
_type: _type,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return signal
|
|
|
|
func NewSignal(source GraphNode, _type string) BaseSignal {
|
|
|
|
|
|
|
|
return NewBaseSignal(source, _type, false)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GraphNode is the interface common to both DAG nodes and Event tree nodes
|
|
|
|
// GraphNode is the interface common to both DAG nodes and Event tree nodes
|
|
|
|