acquisitionUnit :: ComponentInstance
acquisitionUnit = ComponentInstance a
  $ CompositeComponent nameAcquisitionUnit sig cs inb exb
 where
  m2a = mkMessage "m2a" "{data:RawPicture}"
  m2b = mkMessage "m2b" "{data:RawVideo}"
  sig = Signature
    [askPic, askVid]
    [getPic, getVid, storePic, storeVid]
    (fromList
      [ (askPic  , m1)
      , (getPic  , m1)
      , (storePic, m1s)
      , (askVid  , m1)
      , (getVid  , m1)
      , (storeVid, m1s)
      ]
    )
    (fromList
      [ (askPic  , Just m4)
      , (getPic  , Just m2a)
      , (storePic, Nothing)
      , (askVid  , Just m4)
      , (getVid  , Just m2b)
      , (storeVid, Nothing)
      ]
    )
  cs  = [pictureUnit, videoUnit]
  inb = []
  exb =
    [ n1 @: self # askPic ==> p # askPic
    , n2 @: self # askVid ==> v # askVid
    , n3 @: p # getPic ==> self # getPic
    , n4 @: v # getVid ==> self # getVid
    , n5 @: p # storePic ==> self # storePic
    , n6 @: v # storeVid ==> self # storeVid
    ]

--
-- Rover
--
acquisitionUnit :: ComponentInstance
acquisitionUnit = ComponentInstance a
  $ CompositeComponent nameAcquisitionUnit sig cs inb exb
 where
  m2a = mkMessage "m2a" "{data:RawPicture}"
  m2b = mkMessage "m2b" "{data:RawVideo}"
  sig = Signature
    [askPic, askVid]
    [getPic, getVid, storePic, storeVid]
    (fromList
      [ (askPic  , m1)
      , (getPic  , m1)
      , (storePic, m1s)
      , (askVid  , m1)
      , (getVid  , m1)
      , (storeVid, m1s)
      ]
    )
    (fromList
      [ (askPic  , Just m4)
      , (getPic  , Just m2a)
      , (storePic, Nothing)
      , (askVid  , Just m4)
      , (getVid  , Just m2b)
      , (storeVid, Nothing)
      ]
    )
  cs  = [pictureUnit, videoUnit]
  inb = []
  exb =
    [ n1 @: self # askPic ==> p # askPic
    , n2 @: self # askVid ==> v # askVid
    , n3 @: p # getPic ==> self # getPic
    , n4 @: v # getVid ==> self # getVid
    , n5 @: p # storePic ==> self # storePic
    , n6 @: v # storeVid ==> self # storeVid
    ]

--
-- Rover
--
acquisitionUnit = ComponentInstance a
  $ CompositeComponent nameAcquisitionUnit sig cs inb exb
 where
  m2a = mkMessage "m2a" "{data:RawPicture}"
  m2b = mkMessage "m2b" "{data:RawVideo}"
  sig = Signature
    [askPic, askVid]
    [getPic, getVid, storePic, storeVid]
    (fromList
      [ (askPic  , m1)
      , (getPic  , m1)
      , (storePic, m1s)
      , (askVid  , m1)
      , (getVid  , m1)
      , (storeVid, m1s)
      ]
    )
    (fromList
      [ (askPic  , Just m4)
      , (getPic  , Just m2a)
      , (storePic, Nothing)
      , (askVid  , Just m4)
      , (getVid  , Just m2b)
      , (storeVid, Nothing)
      ]
    )
  cs  = [pictureUnit, videoUnit]
  inb = []
  exb =
    [ n1 @: self # askPic ==> p # askPic
    , n2 @: self # askVid ==> v # askVid
    , n3 @: p # getPic ==> self # getPic
    , n4 @: v # getVid ==> self # getVid
    , n5 @: p # storePic ==> self # storePic
    , n6 @: v # storeVid ==> self # storeVid
    ]

--
-- Rover
--