storeUnit :: ComponentInstance
storeUnit = ComponentInstance s $ BasicComponent nameStoreUnit sig beh
 where
  sig = Signature [storePic, storeVid]
                  []
                  (fromList [(storePic, m1s), (storeVid, m1s)])
                  (fromList [(storePic, Nothing), (storeVid, Nothing)])
  beh = LabelledTransitionSystem
    mempty
    [tau (TimeValue 2) (TimeValue 4), receive storePic, receive storeVid]
    (State <$> ["0", "1"])
    (State "0")
    [State "0"]
    [ "0" -| receive storePic |-> "1"
    , "0" -| receive storeVid |-> "1"
    , "1" -| tau (TimeValue 2) (TimeValue 4) |-> "0"
    ]

--
-- Picture Unit
--
storeUnit :: ComponentInstance
storeUnit = ComponentInstance s $ BasicComponent nameStoreUnit sig beh
 where
  sig = Signature [storePic, storeVid]
                  []
                  (fromList [(storePic, m1s), (storeVid, m1s)])
                  (fromList [(storePic, Nothing), (storeVid, Nothing)])
  beh = LabelledTransitionSystem
    mempty
    [tau (TimeValue 2) (TimeValue 4), receive storePic, receive storeVid]
    (State <$> ["0", "1"])
    (State "0")
    [State "0"]
    [ "0" -| receive storePic |-> "1"
    , "0" -| receive storeVid |-> "1"
    , "1" -| tau (TimeValue 2) (TimeValue 4) |-> "0"
    ]

--
-- Picture Unit
--
storeUnit = ComponentInstance s $ BasicComponent nameStoreUnit sig beh
 where
  sig = Signature [storePic, storeVid]
                  []
                  (fromList [(storePic, m1s), (storeVid, m1s)])
                  (fromList [(storePic, Nothing), (storeVid, Nothing)])
  beh = LabelledTransitionSystem
    mempty
    [tau (TimeValue 2) (TimeValue 4), receive storePic, receive storeVid]
    (State <$> ["0", "1"])
    (State "0")
    [State "0"]
    [ "0" -| receive storePic |-> "1"
    , "0" -| receive storeVid |-> "1"
    , "1" -| tau (TimeValue 2) (TimeValue 4) |-> "0"
    ]

--
-- Picture Unit
--