{-# OPTIONS_GHC -optc-DCABAL_BINDGEN=1 #-}
{-# LINE 1 "lib/Tango/Raw/Common.hsc" #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
module Tango.Raw.Common
( HaskellTangoDevState (..),
HaskellDispLevel (..),
HaskellTangoPropertyData (..),
HaskellTangoDevEncoded (..),
EventType (..),
HaskellAttrWriteType (..),
ErrSeverity (..),
DatabaseProxyPtr,
HaskellDataQuality (..),
HaskellDbData (..),
HaskellDbDatum (..),
HaskellAttributeInfoList (..),
HaskellAttributeDataList (..),
HaskellAttributeInfo (..),
HaskellDataFormat (..),
HaskellTangoVarArray (..),
Timeval (..),
DeviceProxyPtr,
HaskellDevSource (..),
HaskellErrorStack (..),
DevFailed (..),
TangoAttrMemorizedType (..),
HaskellAttributeData (..),
HaskellCommandData (..),
HaskellTangoDataType (..),
HaskellTangoCommandData (..),
HaskellCommandInfoList (..),
HaskellCommandInfo (..),
HaskellTangoAttributeData (..),
tango_create_device_proxy,
tango_delete_device_proxy,
tango_read_attribute,
tango_write_attribute,
tango_poll_command,
tango_stop_poll_command,
tango_free_AttributeInfoList,
tango_poll_attribute,
tango_stop_poll_attribute,
tango_command_inout,
tango_free_AttributeData,
createEventCallbackWrapper,
tango_free_CommandData,
tango_get_timeout_millis,
tango_set_timeout_millis,
tango_create_database_proxy,
tango_delete_database_proxy,
tango_get_property,
tango_command_query,
tango_free_DbData,
tango_free_DbDatum,
tango_put_property,
tango_delete_property,
tango_get_device_property,
tango_delete_device_property,
tango_get_object_list,
tango_write_attributes,
tango_get_object_property_list,
tango_free_VarStringArray,
tango_get_attribute_list,
tango_read_attributes,
tango_get_device_exported,
tango_put_device_property,
tango_set_source,
tango_command_list_query,
tango_free_CommandInfoList,
tango_free_CommandInfo,
tango_lock,
tango_get_device_exported_for_class,
haskellDisplayLevelExpert,
tango_get_attribute_config,
haskellDisplayLevelOperator,
tango_unlock,
tango_locking_status,
devSourceToInt,
devSourceFromInt,
tango_create_event_callback,
tango_free_event_callback,
tango_subscribe_event,
tango_unsubscribe_event,
)
where
import Control.Applicative (pure)
import Data.Bool (Bool)
import Data.Eq (Eq, (==))
import Data.Foldable (Foldable)
import Data.Function ((.))
import Data.Functor (Functor, (<$>))
import Data.Int (Int32)
import Data.List (find, zip)
import Data.Maybe (Maybe (Just, Nothing))
import Data.Ord (Ord)
import Data.Semigroup ((<>))
import Data.String (String)
import Data.Traversable (Traversable)
import Data.Tuple (fst, snd)
import Data.Word (Word16, Word32, Word64, Word8)
import Foreign (Storable (alignment, peek, poke, sizeOf), peekByteOff, pokeByteOff)
import Foreign.C.String (CString, peekCString)
import Foreign.C.Types (CBool (CBool), CChar, CDouble, CFloat, CInt (CInt), CLong, CShort, CUInt, CULong, CUShort)
import Foreign.Ptr (FunPtr, Ptr, castPtr)
import Foreign.Storable.Generic (GStorable)
import GHC.Generics (Generic)
import System.IO (IO)
import Text.Show (Show, show)
import Prelude (Bounded, Enum, error, maxBound, minBound)
peekBounded :: (Enum a, Bounded a) => String -> Ptr a -> IO a
peekBounded :: forall a. (Enum a, Bounded a) => String -> Ptr a -> IO a
peekBounded String
desc Ptr a
ptr = do
CInt
value :: CInt <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr a -> Ptr CInt
forall a b. Ptr a -> Ptr b
castPtr Ptr a
ptr)
case (CInt, a) -> a
forall a b. (a, b) -> b
snd ((CInt, a) -> a) -> Maybe (CInt, a) -> Maybe a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((CInt, a) -> Bool) -> [(CInt, a)] -> Maybe (CInt, a)
forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a
find ((CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
== CInt
value) (CInt -> Bool) -> ((CInt, a) -> CInt) -> (CInt, a) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CInt, a) -> CInt
forall a b. (a, b) -> a
fst) ([CInt] -> [a] -> [(CInt, a)]
forall a b. [a] -> [b] -> [(a, b)]
zip [CInt
0 ..] [a
forall a. Bounded a => a
minBound .. a
forall a. Bounded a => a
maxBound]) of
Maybe a
Nothing -> String -> IO a
forall a. HasCallStack => String -> a
error (String
"invalid constant (" String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
desc String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
"): " String -> String -> String
forall a. Semigroup a => a -> a -> a
<> CInt -> String
forall a. Show a => a -> String
show CInt
value)
Just a
v -> a -> IO a
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure a
v
pokeBounded :: (Show a, Eq a, Enum a, Bounded a) => String -> Ptr a -> a -> IO ()
pokeBounded :: forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
desc Ptr a
ptr a
x =
case (CInt, a) -> CInt
forall a b. (a, b) -> a
fst ((CInt, a) -> CInt) -> Maybe (CInt, a) -> Maybe CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (((CInt, a) -> Bool) -> [(CInt, a)] -> Maybe (CInt, a)
forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Maybe a
find ((a -> a -> Bool
forall a. Eq a => a -> a -> Bool
== a
x) (a -> Bool) -> ((CInt, a) -> a) -> (CInt, a) -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CInt, a) -> a
forall a b. (a, b) -> b
snd) ([CInt] -> [a] -> [(CInt, a)]
forall a b. [a] -> [b] -> [(a, b)]
zip [CInt
0 ..] [a
forall a. Bounded a => a
minBound .. a
forall a. Bounded a => a
maxBound])) of
Maybe CInt
Nothing -> String -> IO ()
forall a. HasCallStack => String -> a
error (String
"invalid constant (" String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
desc String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
"): " String -> String -> String
forall a. Semigroup a => a -> a -> a
<> a -> String
forall a. Show a => a -> String
show a
x)
Just CInt
v -> forall a. Storable a => Ptr a -> a -> IO ()
poke @CInt (Ptr a -> Ptr CInt
forall a b. Ptr a -> Ptr b
castPtr Ptr a
ptr) CInt
v
data HaskellTangoDevState
= On
| Off
| Close
| Open
| Insert
|
| Moving
| Standby
| Fault
| Init
| Running
| Alarm
| Disable
| Unknown
deriving (Int -> HaskellTangoDevState -> String -> String
[HaskellTangoDevState] -> String -> String
HaskellTangoDevState -> String
(Int -> HaskellTangoDevState -> String -> String)
-> (HaskellTangoDevState -> String)
-> ([HaskellTangoDevState] -> String -> String)
-> Show HaskellTangoDevState
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoDevState -> String -> String
showsPrec :: Int -> HaskellTangoDevState -> String -> String
$cshow :: HaskellTangoDevState -> String
show :: HaskellTangoDevState -> String
$cshowList :: [HaskellTangoDevState] -> String -> String
showList :: [HaskellTangoDevState] -> String -> String
Show, HaskellTangoDevState -> HaskellTangoDevState -> Bool
(HaskellTangoDevState -> HaskellTangoDevState -> Bool)
-> (HaskellTangoDevState -> HaskellTangoDevState -> Bool)
-> Eq HaskellTangoDevState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HaskellTangoDevState -> HaskellTangoDevState -> Bool
== :: HaskellTangoDevState -> HaskellTangoDevState -> Bool
$c/= :: HaskellTangoDevState -> HaskellTangoDevState -> Bool
/= :: HaskellTangoDevState -> HaskellTangoDevState -> Bool
Eq, HaskellTangoDevState
HaskellTangoDevState
-> HaskellTangoDevState -> Bounded HaskellTangoDevState
forall a. a -> a -> Bounded a
$cminBound :: HaskellTangoDevState
minBound :: HaskellTangoDevState
$cmaxBound :: HaskellTangoDevState
maxBound :: HaskellTangoDevState
Bounded, Int -> HaskellTangoDevState
HaskellTangoDevState -> Int
HaskellTangoDevState -> [HaskellTangoDevState]
HaskellTangoDevState -> HaskellTangoDevState
HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState]
HaskellTangoDevState
-> HaskellTangoDevState
-> HaskellTangoDevState
-> [HaskellTangoDevState]
(HaskellTangoDevState -> HaskellTangoDevState)
-> (HaskellTangoDevState -> HaskellTangoDevState)
-> (Int -> HaskellTangoDevState)
-> (HaskellTangoDevState -> Int)
-> (HaskellTangoDevState -> [HaskellTangoDevState])
-> (HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState])
-> (HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState])
-> (HaskellTangoDevState
-> HaskellTangoDevState
-> HaskellTangoDevState
-> [HaskellTangoDevState])
-> Enum HaskellTangoDevState
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: HaskellTangoDevState -> HaskellTangoDevState
succ :: HaskellTangoDevState -> HaskellTangoDevState
$cpred :: HaskellTangoDevState -> HaskellTangoDevState
pred :: HaskellTangoDevState -> HaskellTangoDevState
$ctoEnum :: Int -> HaskellTangoDevState
toEnum :: Int -> HaskellTangoDevState
$cfromEnum :: HaskellTangoDevState -> Int
fromEnum :: HaskellTangoDevState -> Int
$cenumFrom :: HaskellTangoDevState -> [HaskellTangoDevState]
enumFrom :: HaskellTangoDevState -> [HaskellTangoDevState]
$cenumFromThen :: HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState]
enumFromThen :: HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState]
$cenumFromTo :: HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState]
enumFromTo :: HaskellTangoDevState
-> HaskellTangoDevState -> [HaskellTangoDevState]
$cenumFromThenTo :: HaskellTangoDevState
-> HaskellTangoDevState
-> HaskellTangoDevState
-> [HaskellTangoDevState]
enumFromThenTo :: HaskellTangoDevState
-> HaskellTangoDevState
-> HaskellTangoDevState
-> [HaskellTangoDevState]
Enum)
instance Storable HaskellTangoDevState where
sizeOf :: HaskellTangoDevState -> Int
sizeOf HaskellTangoDevState
_ = ((Int
4))
{-# LINE 162 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 163 "lib/Tango/Raw/Common.hsc" #-}
peek = peekBounded "dev state"
poke :: Ptr HaskellTangoDevState -> HaskellTangoDevState -> IO ()
poke = String -> Ptr HaskellTangoDevState -> HaskellTangoDevState -> IO ()
forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
"dev state"
data TangoAttrMemorizedType
= NotKnown
| None
| Memorized
| MemorizedWriteInit
deriving (Int -> TangoAttrMemorizedType -> String -> String
[TangoAttrMemorizedType] -> String -> String
TangoAttrMemorizedType -> String
(Int -> TangoAttrMemorizedType -> String -> String)
-> (TangoAttrMemorizedType -> String)
-> ([TangoAttrMemorizedType] -> String -> String)
-> Show TangoAttrMemorizedType
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> TangoAttrMemorizedType -> String -> String
showsPrec :: Int -> TangoAttrMemorizedType -> String -> String
$cshow :: TangoAttrMemorizedType -> String
show :: TangoAttrMemorizedType -> String
$cshowList :: [TangoAttrMemorizedType] -> String -> String
showList :: [TangoAttrMemorizedType] -> String -> String
Show, TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool
(TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool)
-> (TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool)
-> Eq TangoAttrMemorizedType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool
== :: TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool
$c/= :: TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool
/= :: TangoAttrMemorizedType -> TangoAttrMemorizedType -> Bool
Eq, TangoAttrMemorizedType
TangoAttrMemorizedType
-> TangoAttrMemorizedType -> Bounded TangoAttrMemorizedType
forall a. a -> a -> Bounded a
$cminBound :: TangoAttrMemorizedType
minBound :: TangoAttrMemorizedType
$cmaxBound :: TangoAttrMemorizedType
maxBound :: TangoAttrMemorizedType
Bounded, Int -> TangoAttrMemorizedType
TangoAttrMemorizedType -> Int
TangoAttrMemorizedType -> [TangoAttrMemorizedType]
TangoAttrMemorizedType -> TangoAttrMemorizedType
TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType]
TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> [TangoAttrMemorizedType]
(TangoAttrMemorizedType -> TangoAttrMemorizedType)
-> (TangoAttrMemorizedType -> TangoAttrMemorizedType)
-> (Int -> TangoAttrMemorizedType)
-> (TangoAttrMemorizedType -> Int)
-> (TangoAttrMemorizedType -> [TangoAttrMemorizedType])
-> (TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType])
-> (TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType])
-> (TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> [TangoAttrMemorizedType])
-> Enum TangoAttrMemorizedType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: TangoAttrMemorizedType -> TangoAttrMemorizedType
succ :: TangoAttrMemorizedType -> TangoAttrMemorizedType
$cpred :: TangoAttrMemorizedType -> TangoAttrMemorizedType
pred :: TangoAttrMemorizedType -> TangoAttrMemorizedType
$ctoEnum :: Int -> TangoAttrMemorizedType
toEnum :: Int -> TangoAttrMemorizedType
$cfromEnum :: TangoAttrMemorizedType -> Int
fromEnum :: TangoAttrMemorizedType -> Int
$cenumFrom :: TangoAttrMemorizedType -> [TangoAttrMemorizedType]
enumFrom :: TangoAttrMemorizedType -> [TangoAttrMemorizedType]
$cenumFromThen :: TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType]
enumFromThen :: TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType]
$cenumFromTo :: TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType]
enumFromTo :: TangoAttrMemorizedType
-> TangoAttrMemorizedType -> [TangoAttrMemorizedType]
$cenumFromThenTo :: TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> [TangoAttrMemorizedType]
enumFromThenTo :: TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> TangoAttrMemorizedType
-> [TangoAttrMemorizedType]
Enum)
instance Storable TangoAttrMemorizedType where
sizeOf :: TangoAttrMemorizedType -> Int
sizeOf TangoAttrMemorizedType
_ = ((Int
4))
{-# LINE 175 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 176 "lib/Tango/Raw/Common.hsc" #-}
peek = peekBounded "TangoAttrMemorizedType"
poke :: Ptr TangoAttrMemorizedType -> TangoAttrMemorizedType -> IO ()
poke = String
-> Ptr TangoAttrMemorizedType -> TangoAttrMemorizedType -> IO ()
forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
"TangoAttrMemorizedType"
data HaskellDevSource
= Dev
| Cache
| CacheDev
deriving (Int -> HaskellDevSource -> String -> String
[HaskellDevSource] -> String -> String
HaskellDevSource -> String
(Int -> HaskellDevSource -> String -> String)
-> (HaskellDevSource -> String)
-> ([HaskellDevSource] -> String -> String)
-> Show HaskellDevSource
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDevSource -> String -> String
showsPrec :: Int -> HaskellDevSource -> String -> String
$cshow :: HaskellDevSource -> String
show :: HaskellDevSource -> String
$cshowList :: [HaskellDevSource] -> String -> String
showList :: [HaskellDevSource] -> String -> String
Show, HaskellDevSource -> HaskellDevSource -> Bool
(HaskellDevSource -> HaskellDevSource -> Bool)
-> (HaskellDevSource -> HaskellDevSource -> Bool)
-> Eq HaskellDevSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HaskellDevSource -> HaskellDevSource -> Bool
== :: HaskellDevSource -> HaskellDevSource -> Bool
$c/= :: HaskellDevSource -> HaskellDevSource -> Bool
/= :: HaskellDevSource -> HaskellDevSource -> Bool
Eq, HaskellDevSource
HaskellDevSource -> HaskellDevSource -> Bounded HaskellDevSource
forall a. a -> a -> Bounded a
$cminBound :: HaskellDevSource
minBound :: HaskellDevSource
$cmaxBound :: HaskellDevSource
maxBound :: HaskellDevSource
Bounded, Int -> HaskellDevSource
HaskellDevSource -> Int
HaskellDevSource -> [HaskellDevSource]
HaskellDevSource -> HaskellDevSource
HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
HaskellDevSource
-> HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
(HaskellDevSource -> HaskellDevSource)
-> (HaskellDevSource -> HaskellDevSource)
-> (Int -> HaskellDevSource)
-> (HaskellDevSource -> Int)
-> (HaskellDevSource -> [HaskellDevSource])
-> (HaskellDevSource -> HaskellDevSource -> [HaskellDevSource])
-> (HaskellDevSource -> HaskellDevSource -> [HaskellDevSource])
-> (HaskellDevSource
-> HaskellDevSource -> HaskellDevSource -> [HaskellDevSource])
-> Enum HaskellDevSource
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: HaskellDevSource -> HaskellDevSource
succ :: HaskellDevSource -> HaskellDevSource
$cpred :: HaskellDevSource -> HaskellDevSource
pred :: HaskellDevSource -> HaskellDevSource
$ctoEnum :: Int -> HaskellDevSource
toEnum :: Int -> HaskellDevSource
$cfromEnum :: HaskellDevSource -> Int
fromEnum :: HaskellDevSource -> Int
$cenumFrom :: HaskellDevSource -> [HaskellDevSource]
enumFrom :: HaskellDevSource -> [HaskellDevSource]
$cenumFromThen :: HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
enumFromThen :: HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
$cenumFromTo :: HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
enumFromTo :: HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
$cenumFromThenTo :: HaskellDevSource
-> HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
enumFromThenTo :: HaskellDevSource
-> HaskellDevSource -> HaskellDevSource -> [HaskellDevSource]
Enum)
devSourceToInt :: HaskellDevSource -> CInt
devSourceToInt :: HaskellDevSource -> CInt
devSourceToInt HaskellDevSource
Dev = CInt
0
devSourceToInt HaskellDevSource
Cache = CInt
1
devSourceToInt HaskellDevSource
CacheDev = CInt
2
devSourceFromInt :: CInt -> HaskellDevSource
devSourceFromInt :: CInt -> HaskellDevSource
devSourceFromInt CInt
0 = HaskellDevSource
Dev
devSourceFromInt CInt
1 = HaskellDevSource
Cache
devSourceFromInt CInt
_ = HaskellDevSource
CacheDev
type CTangoEnum = CShort
data HaskellTangoVarArray a = HaskellTangoVarArray
{ forall a. HaskellTangoVarArray a -> Word32
varArrayLength :: Word32,
forall a. HaskellTangoVarArray a -> Ptr a
varArrayValues :: Ptr a
}
deriving (Int -> HaskellTangoVarArray a -> String -> String
[HaskellTangoVarArray a] -> String -> String
HaskellTangoVarArray a -> String
(Int -> HaskellTangoVarArray a -> String -> String)
-> (HaskellTangoVarArray a -> String)
-> ([HaskellTangoVarArray a] -> String -> String)
-> Show (HaskellTangoVarArray a)
forall a. Int -> HaskellTangoVarArray a -> String -> String
forall a. [HaskellTangoVarArray a] -> String -> String
forall a. HaskellTangoVarArray a -> String
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: forall a. Int -> HaskellTangoVarArray a -> String -> String
showsPrec :: Int -> HaskellTangoVarArray a -> String -> String
$cshow :: forall a. HaskellTangoVarArray a -> String
show :: HaskellTangoVarArray a -> String
$cshowList :: forall a. [HaskellTangoVarArray a] -> String -> String
showList :: [HaskellTangoVarArray a] -> String -> String
Show, (forall x.
HaskellTangoVarArray a -> Rep (HaskellTangoVarArray a) x)
-> (forall x.
Rep (HaskellTangoVarArray a) x -> HaskellTangoVarArray a)
-> Generic (HaskellTangoVarArray a)
forall x. Rep (HaskellTangoVarArray a) x -> HaskellTangoVarArray a
forall x. HaskellTangoVarArray a -> Rep (HaskellTangoVarArray a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x.
Rep (HaskellTangoVarArray a) x -> HaskellTangoVarArray a
forall a x.
HaskellTangoVarArray a -> Rep (HaskellTangoVarArray a) x
$cfrom :: forall a x.
HaskellTangoVarArray a -> Rep (HaskellTangoVarArray a) x
from :: forall x. HaskellTangoVarArray a -> Rep (HaskellTangoVarArray a) x
$cto :: forall a x.
Rep (HaskellTangoVarArray a) x -> HaskellTangoVarArray a
to :: forall x. Rep (HaskellTangoVarArray a) x -> HaskellTangoVarArray a
Generic)
instance (Storable a) => GStorable (HaskellTangoVarArray a)
data HaskellTangoCommandData
= HaskellCommandVoid
| HaskellCommandBool !CBool
| HaskellCommandShort !CShort
| HaskellCommandUShort !CUShort
| HaskellCommandInt32 !CInt
| HaskellCommandUInt32 !CUInt
| HaskellCommandFloat !CFloat
| HaskellCommandDouble !CDouble
| HaskellCommandCString !CString
| HaskellCommandLong64 !CLong
| HaskellCommandDevState !HaskellTangoDevState
| HaskellCommandULong64 !CULong
| HaskellCommandDevEncoded !HaskellTangoDevEncoded
| HaskellCommandDevEnum !CTangoEnum
| HaskellCommandVarBool !(HaskellTangoVarArray CBool)
| HaskellCommandVarChar !(HaskellTangoVarArray CChar)
| HaskellCommandVarShort !(HaskellTangoVarArray CShort)
| HaskellCommandVarUShort !(HaskellTangoVarArray CUShort)
| HaskellCommandVarLong !(HaskellTangoVarArray CLong)
| HaskellCommandVarULong !(HaskellTangoVarArray CULong)
| HaskellCommandVarLong64 !(HaskellTangoVarArray CLong)
| HaskellCommandVarULong64 !(HaskellTangoVarArray CULong)
| HaskellCommandVarFloat !(HaskellTangoVarArray CFloat)
| HaskellCommandVarDouble !(HaskellTangoVarArray CDouble)
| HaskellCommandVarCString !(HaskellTangoVarArray CString)
| HaskellCommandVarDevState !(HaskellTangoVarArray HaskellTangoDevState)
| HaskellCommandLongStringArray !HaskellVarLongStringArray
| HaskellCommandDoubleStringArray !HaskellVarDoubleStringArray
deriving (Int -> HaskellTangoCommandData -> String -> String
[HaskellTangoCommandData] -> String -> String
HaskellTangoCommandData -> String
(Int -> HaskellTangoCommandData -> String -> String)
-> (HaskellTangoCommandData -> String)
-> ([HaskellTangoCommandData] -> String -> String)
-> Show HaskellTangoCommandData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoCommandData -> String -> String
showsPrec :: Int -> HaskellTangoCommandData -> String -> String
$cshow :: HaskellTangoCommandData -> String
show :: HaskellTangoCommandData -> String
$cshowList :: [HaskellTangoCommandData] -> String -> String
showList :: [HaskellTangoCommandData] -> String -> String
Show)
data HaskellTangoAttributeData
= HaskellAttributeDataBoolArray !(HaskellTangoVarArray CBool)
| HaskellAttributeDataCharArray !(HaskellTangoVarArray CChar)
| HaskellAttributeDataShortArray !(HaskellTangoVarArray CShort)
| HaskellAttributeDataUShortArray !(HaskellTangoVarArray CUShort)
| HaskellAttributeDataLongArray !(HaskellTangoVarArray CLong)
| HaskellAttributeDataULongArray !(HaskellTangoVarArray CULong)
|
HaskellAttributeDataLong64Array !(HaskellTangoVarArray CLong)
| HaskellAttributeDataULong64Array !(HaskellTangoVarArray CULong)
| HaskellAttributeDataFloatArray !(HaskellTangoVarArray CFloat)
| HaskellAttributeDataDoubleArray !(HaskellTangoVarArray CDouble)
| HaskellAttributeDataStringArray !(HaskellTangoVarArray CString)
| HaskellAttributeDataStateArray !(HaskellTangoVarArray HaskellTangoDevState)
| HaskellAttributeDataEncodedArray !(HaskellTangoVarArray HaskellTangoDevEncoded)
deriving (Int -> HaskellTangoAttributeData -> String -> String
[HaskellTangoAttributeData] -> String -> String
HaskellTangoAttributeData -> String
(Int -> HaskellTangoAttributeData -> String -> String)
-> (HaskellTangoAttributeData -> String)
-> ([HaskellTangoAttributeData] -> String -> String)
-> Show HaskellTangoAttributeData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoAttributeData -> String -> String
showsPrec :: Int -> HaskellTangoAttributeData -> String -> String
$cshow :: HaskellTangoAttributeData -> String
show :: HaskellTangoAttributeData -> String
$cshowList :: [HaskellTangoAttributeData] -> String -> String
showList :: [HaskellTangoAttributeData] -> String -> String
Show)
data HaskellTangoPropertyData
= HaskellPropBool !CBool
| HaskellPropChar !CChar
| HaskellPropShort !CShort
| HaskellPropUShort !CUShort
|
HaskellPropLong !CInt
| HaskellPropULong !CUInt
| HaskellPropFloat !CFloat
| HaskellPropDouble !CDouble
| HaskellPropString !CString
| HaskellPropLong64 !CLong
| HaskellPropULong64 !CULong
| HaskellPropShortArray !(HaskellTangoVarArray CShort)
| HaskellPropUShortArray !(HaskellTangoVarArray CUShort)
| HaskellPropLongArray !(HaskellTangoVarArray CLong)
| HaskellPropULongArray !(HaskellTangoVarArray CULong)
| HaskellPropLong64Array !(HaskellTangoVarArray CLong)
| HaskellPropULong64Array !(HaskellTangoVarArray CULong)
| HaskellPropFloatArray !(HaskellTangoVarArray CFloat)
| HaskellPropDoubleArray !(HaskellTangoVarArray CDouble)
| HaskellPropStringArray !(HaskellTangoVarArray CString)
deriving (Int -> HaskellTangoPropertyData -> String -> String
[HaskellTangoPropertyData] -> String -> String
HaskellTangoPropertyData -> String
(Int -> HaskellTangoPropertyData -> String -> String)
-> (HaskellTangoPropertyData -> String)
-> ([HaskellTangoPropertyData] -> String -> String)
-> Show HaskellTangoPropertyData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoPropertyData -> String -> String
showsPrec :: Int -> HaskellTangoPropertyData -> String -> String
$cshow :: HaskellTangoPropertyData -> String
show :: HaskellTangoPropertyData -> String
$cshowList :: [HaskellTangoPropertyData] -> String -> String
showList :: [HaskellTangoPropertyData] -> String -> String
Show)
data HaskellTangoDataType
= HaskellDevVoid
| HaskellDevBoolean
| HaskellDevShort
| HaskellDevLong
| HaskellDevFloat
| HaskellDevDouble
| HaskellDevUShort
| HaskellDevULong
| HaskellDevString
| HaskellDevVarCharArray
| HaskellDevVarShortArray
| HaskellDevVarLongArray
| HaskellDevVarFloatArray
| HaskellDevVarDoubleArray
| HaskellDevVarUShortArray
| HaskellDevVarULongArray
| HaskellDevVarStringArray
| HaskellDevVarLongStringArray
| HaskellDevVarDoubleStringArray
| HaskellDevState
| HaskellConstDevString
| HaskellDevVarBooleanArray
| HaskellDevUChar
| HaskellDevLong64
| HaskellDevULong64
| HaskellDevVarLong64Array
| HaskellDevVarULong64Array
| HaskellDevInt
| HaskellDevEncoded
| HaskellDevEnum
|
HaskellDevUnknown
| HaskellDevVarStateArray
| HaskellDevVarEncodedArray
deriving (Int -> HaskellTangoDataType -> String -> String
[HaskellTangoDataType] -> String -> String
HaskellTangoDataType -> String
(Int -> HaskellTangoDataType -> String -> String)
-> (HaskellTangoDataType -> String)
-> ([HaskellTangoDataType] -> String -> String)
-> Show HaskellTangoDataType
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoDataType -> String -> String
showsPrec :: Int -> HaskellTangoDataType -> String -> String
$cshow :: HaskellTangoDataType -> String
show :: HaskellTangoDataType -> String
$cshowList :: [HaskellTangoDataType] -> String -> String
showList :: [HaskellTangoDataType] -> String -> String
Show, HaskellTangoDataType -> HaskellTangoDataType -> Bool
(HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> (HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> Eq HaskellTangoDataType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
== :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
$c/= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
/= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
Eq, Eq HaskellTangoDataType
Eq HaskellTangoDataType =>
(HaskellTangoDataType -> HaskellTangoDataType -> Ordering)
-> (HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> (HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> (HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> (HaskellTangoDataType -> HaskellTangoDataType -> Bool)
-> (HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType)
-> (HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType)
-> Ord HaskellTangoDataType
HaskellTangoDataType -> HaskellTangoDataType -> Bool
HaskellTangoDataType -> HaskellTangoDataType -> Ordering
HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: HaskellTangoDataType -> HaskellTangoDataType -> Ordering
compare :: HaskellTangoDataType -> HaskellTangoDataType -> Ordering
$c< :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
< :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
$c<= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
<= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
$c> :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
> :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
$c>= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
>= :: HaskellTangoDataType -> HaskellTangoDataType -> Bool
$cmax :: HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType
max :: HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType
$cmin :: HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType
min :: HaskellTangoDataType
-> HaskellTangoDataType -> HaskellTangoDataType
Ord, HaskellTangoDataType
HaskellTangoDataType
-> HaskellTangoDataType -> Bounded HaskellTangoDataType
forall a. a -> a -> Bounded a
$cminBound :: HaskellTangoDataType
minBound :: HaskellTangoDataType
$cmaxBound :: HaskellTangoDataType
maxBound :: HaskellTangoDataType
Bounded, Int -> HaskellTangoDataType
HaskellTangoDataType -> Int
HaskellTangoDataType -> [HaskellTangoDataType]
HaskellTangoDataType -> HaskellTangoDataType
HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType]
HaskellTangoDataType
-> HaskellTangoDataType
-> HaskellTangoDataType
-> [HaskellTangoDataType]
(HaskellTangoDataType -> HaskellTangoDataType)
-> (HaskellTangoDataType -> HaskellTangoDataType)
-> (Int -> HaskellTangoDataType)
-> (HaskellTangoDataType -> Int)
-> (HaskellTangoDataType -> [HaskellTangoDataType])
-> (HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType])
-> (HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType])
-> (HaskellTangoDataType
-> HaskellTangoDataType
-> HaskellTangoDataType
-> [HaskellTangoDataType])
-> Enum HaskellTangoDataType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: HaskellTangoDataType -> HaskellTangoDataType
succ :: HaskellTangoDataType -> HaskellTangoDataType
$cpred :: HaskellTangoDataType -> HaskellTangoDataType
pred :: HaskellTangoDataType -> HaskellTangoDataType
$ctoEnum :: Int -> HaskellTangoDataType
toEnum :: Int -> HaskellTangoDataType
$cfromEnum :: HaskellTangoDataType -> Int
fromEnum :: HaskellTangoDataType -> Int
$cenumFrom :: HaskellTangoDataType -> [HaskellTangoDataType]
enumFrom :: HaskellTangoDataType -> [HaskellTangoDataType]
$cenumFromThen :: HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType]
enumFromThen :: HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType]
$cenumFromTo :: HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType]
enumFromTo :: HaskellTangoDataType
-> HaskellTangoDataType -> [HaskellTangoDataType]
$cenumFromThenTo :: HaskellTangoDataType
-> HaskellTangoDataType
-> HaskellTangoDataType
-> [HaskellTangoDataType]
enumFromThenTo :: HaskellTangoDataType
-> HaskellTangoDataType
-> HaskellTangoDataType
-> [HaskellTangoDataType]
Enum)
instance Storable HaskellTangoDataType where
sizeOf :: HaskellTangoDataType -> Int
sizeOf HaskellTangoDataType
_ = ((Int
4))
{-# LINE 319 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 320 "lib/Tango/Raw/Common.hsc" #-}
peek = peekBounded "data type"
poke :: Ptr HaskellTangoDataType -> HaskellTangoDataType -> IO ()
poke = String -> Ptr HaskellTangoDataType -> HaskellTangoDataType -> IO ()
forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
"data type"
data EventType
=
ChangeEvent
|
QualityEvent
|
PeriodicEvent
|
ArchiveEvent
|
UserEvent
|
AttrConfEvent
|
DataReadyEvent
|
InterfaceChangeEvent
|
PipeEvent
deriving (Int -> EventType -> String -> String
[EventType] -> String -> String
EventType -> String
(Int -> EventType -> String -> String)
-> (EventType -> String)
-> ([EventType] -> String -> String)
-> Show EventType
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> EventType -> String -> String
showsPrec :: Int -> EventType -> String -> String
$cshow :: EventType -> String
show :: EventType -> String
$cshowList :: [EventType] -> String -> String
showList :: [EventType] -> String -> String
Show, EventType -> EventType -> Bool
(EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool) -> Eq EventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EventType -> EventType -> Bool
== :: EventType -> EventType -> Bool
$c/= :: EventType -> EventType -> Bool
/= :: EventType -> EventType -> Bool
Eq, Eq EventType
Eq EventType =>
(EventType -> EventType -> Ordering)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> Bool)
-> (EventType -> EventType -> EventType)
-> (EventType -> EventType -> EventType)
-> Ord EventType
EventType -> EventType -> Bool
EventType -> EventType -> Ordering
EventType -> EventType -> EventType
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: EventType -> EventType -> Ordering
compare :: EventType -> EventType -> Ordering
$c< :: EventType -> EventType -> Bool
< :: EventType -> EventType -> Bool
$c<= :: EventType -> EventType -> Bool
<= :: EventType -> EventType -> Bool
$c> :: EventType -> EventType -> Bool
> :: EventType -> EventType -> Bool
$c>= :: EventType -> EventType -> Bool
>= :: EventType -> EventType -> Bool
$cmax :: EventType -> EventType -> EventType
max :: EventType -> EventType -> EventType
$cmin :: EventType -> EventType -> EventType
min :: EventType -> EventType -> EventType
Ord, EventType
EventType -> EventType -> Bounded EventType
forall a. a -> a -> Bounded a
$cminBound :: EventType
minBound :: EventType
$cmaxBound :: EventType
maxBound :: EventType
Bounded, Int -> EventType
EventType -> Int
EventType -> [EventType]
EventType -> EventType
EventType -> EventType -> [EventType]
EventType -> EventType -> EventType -> [EventType]
(EventType -> EventType)
-> (EventType -> EventType)
-> (Int -> EventType)
-> (EventType -> Int)
-> (EventType -> [EventType])
-> (EventType -> EventType -> [EventType])
-> (EventType -> EventType -> [EventType])
-> (EventType -> EventType -> EventType -> [EventType])
-> Enum EventType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: EventType -> EventType
succ :: EventType -> EventType
$cpred :: EventType -> EventType
pred :: EventType -> EventType
$ctoEnum :: Int -> EventType
toEnum :: Int -> EventType
$cfromEnum :: EventType -> Int
fromEnum :: EventType -> Int
$cenumFrom :: EventType -> [EventType]
enumFrom :: EventType -> [EventType]
$cenumFromThen :: EventType -> EventType -> [EventType]
enumFromThen :: EventType -> EventType -> [EventType]
$cenumFromTo :: EventType -> EventType -> [EventType]
enumFromTo :: EventType -> EventType -> [EventType]
$cenumFromThenTo :: EventType -> EventType -> EventType -> [EventType]
enumFromThenTo :: EventType -> EventType -> EventType -> [EventType]
Enum)
instance Storable EventType where
sizeOf :: EventType -> Int
sizeOf EventType
_ = ((Int
4))
{-# LINE 347 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 348 "lib/Tango/Raw/Common.hsc" #-}
peek = peekBounded "event type"
poke :: Ptr EventType -> EventType -> IO ()
poke = String -> Ptr EventType -> EventType -> IO ()
forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
"event type"
data HaskellDataFormat
= HaskellScalar
| HaskellSpectrum
| HaskellImage
deriving (Int -> HaskellDataFormat -> String -> String
[HaskellDataFormat] -> String -> String
HaskellDataFormat -> String
(Int -> HaskellDataFormat -> String -> String)
-> (HaskellDataFormat -> String)
-> ([HaskellDataFormat] -> String -> String)
-> Show HaskellDataFormat
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDataFormat -> String -> String
showsPrec :: Int -> HaskellDataFormat -> String -> String
$cshow :: HaskellDataFormat -> String
show :: HaskellDataFormat -> String
$cshowList :: [HaskellDataFormat] -> String -> String
showList :: [HaskellDataFormat] -> String -> String
Show)
instance Storable HaskellDataFormat where
sizeOf :: HaskellDataFormat -> Int
sizeOf HaskellDataFormat
_ = ((Int
4))
{-# LINE 359 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 360 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
value :: CInt <- peek (castPtr ptr)
case value of
0 -> pure HaskellScalar
1 -> pure HaskellSpectrum
_ -> pure HaskellImage
poke :: Ptr HaskellDataFormat -> HaskellDataFormat -> IO ()
poke Ptr HaskellDataFormat
ptr HaskellDataFormat
x =
forall a. Storable a => Ptr a -> a -> IO ()
poke @CInt
(Ptr HaskellDataFormat -> Ptr CInt
forall a b. Ptr a -> Ptr b
castPtr Ptr HaskellDataFormat
ptr)
( case HaskellDataFormat
x of
HaskellDataFormat
HaskellScalar -> CInt
0
HaskellDataFormat
HaskellSpectrum -> CInt
1
HaskellDataFormat
HaskellImage -> CInt
2
)
data HaskellDataQuality
= HaskellValid
| HaskellInvalid
| HaskellAlarm
| HaskellChanging
| HaskellWarning
deriving (Int -> HaskellDataQuality -> String -> String
[HaskellDataQuality] -> String -> String
HaskellDataQuality -> String
(Int -> HaskellDataQuality -> String -> String)
-> (HaskellDataQuality -> String)
-> ([HaskellDataQuality] -> String -> String)
-> Show HaskellDataQuality
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDataQuality -> String -> String
showsPrec :: Int -> HaskellDataQuality -> String -> String
$cshow :: HaskellDataQuality -> String
show :: HaskellDataQuality -> String
$cshowList :: [HaskellDataQuality] -> String -> String
showList :: [HaskellDataQuality] -> String -> String
Show)
data Timeval = Timeval
{
Timeval -> CLong
tvSec :: !CLong,
Timeval -> CLong
tvUsec :: !CLong
}
deriving (Int -> Timeval -> String -> String
[Timeval] -> String -> String
Timeval -> String
(Int -> Timeval -> String -> String)
-> (Timeval -> String)
-> ([Timeval] -> String -> String)
-> Show Timeval
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> Timeval -> String -> String
showsPrec :: Int -> Timeval -> String -> String
$cshow :: Timeval -> String
show :: Timeval -> String
$cshowList :: [Timeval] -> String -> String
showList :: [Timeval] -> String -> String
Show)
instance Storable Timeval where
sizeOf :: Timeval -> Int
sizeOf Timeval
_ = ((Int
16))
{-# LINE 392 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 393 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
tvSec' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 395 "lib/Tango/Raw/Common.hsc" #-}
tvUsec' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 396 "lib/Tango/Raw/Common.hsc" #-}
pure (Timeval tvSec' tvUsec')
poke :: Ptr Timeval -> Timeval -> IO ()
poke Ptr Timeval
ptr (Timeval CLong
tvSec' CLong
tvUsec') = do
((\Ptr Timeval
hsc_ptr -> Ptr Timeval -> Int -> CLong -> IO ()
forall b. Ptr b -> Int -> CLong -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr Timeval
hsc_ptr Int
0)) Ptr Timeval
ptr CLong
tvSec'
{-# LINE 399 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr tvUsec'
{-# LINE 400 "lib/Tango/Raw/Common.hsc" #-}
data HaskellAttrWriteType = Read | ReadWithWrite | Write | ReadWrite deriving (Int -> HaskellAttrWriteType -> String -> String
[HaskellAttrWriteType] -> String -> String
HaskellAttrWriteType -> String
(Int -> HaskellAttrWriteType -> String -> String)
-> (HaskellAttrWriteType -> String)
-> ([HaskellAttrWriteType] -> String -> String)
-> Show HaskellAttrWriteType
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellAttrWriteType -> String -> String
showsPrec :: Int -> HaskellAttrWriteType -> String -> String
$cshow :: HaskellAttrWriteType -> String
show :: HaskellAttrWriteType -> String
$cshowList :: [HaskellAttrWriteType] -> String -> String
showList :: [HaskellAttrWriteType] -> String -> String
Show)
instance Storable HaskellAttrWriteType where
sizeOf :: HaskellAttrWriteType -> Int
sizeOf HaskellAttrWriteType
_ = ((Int
4))
{-# LINE 405 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 406 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
value :: CInt <- peek (castPtr ptr)
case value of
0 -> pure Read
1 -> pure ReadWithWrite
2 -> pure Write
_ -> pure ReadWrite
poke :: Ptr HaskellAttrWriteType -> HaskellAttrWriteType -> IO ()
poke Ptr HaskellAttrWriteType
ptr HaskellAttrWriteType
x =
forall a. Storable a => Ptr a -> a -> IO ()
poke @CInt
(Ptr HaskellAttrWriteType -> Ptr CInt
forall a b. Ptr a -> Ptr b
castPtr Ptr HaskellAttrWriteType
ptr)
( case HaskellAttrWriteType
x of
HaskellAttrWriteType
Read -> CInt
0
HaskellAttrWriteType
ReadWithWrite -> CInt
1
HaskellAttrWriteType
Write -> CInt
2
HaskellAttrWriteType
ReadWrite -> CInt
3
)
data HaskellDispLevel = Operator | Expert deriving (Int -> HaskellDispLevel -> String -> String
[HaskellDispLevel] -> String -> String
HaskellDispLevel -> String
(Int -> HaskellDispLevel -> String -> String)
-> (HaskellDispLevel -> String)
-> ([HaskellDispLevel] -> String -> String)
-> Show HaskellDispLevel
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDispLevel -> String -> String
showsPrec :: Int -> HaskellDispLevel -> String -> String
$cshow :: HaskellDispLevel -> String
show :: HaskellDispLevel -> String
$cshowList :: [HaskellDispLevel] -> String -> String
showList :: [HaskellDispLevel] -> String -> String
Show, HaskellDispLevel -> HaskellDispLevel -> Bool
(HaskellDispLevel -> HaskellDispLevel -> Bool)
-> (HaskellDispLevel -> HaskellDispLevel -> Bool)
-> Eq HaskellDispLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HaskellDispLevel -> HaskellDispLevel -> Bool
== :: HaskellDispLevel -> HaskellDispLevel -> Bool
$c/= :: HaskellDispLevel -> HaskellDispLevel -> Bool
/= :: HaskellDispLevel -> HaskellDispLevel -> Bool
Eq)
instance Storable HaskellDispLevel where
sizeOf :: HaskellDispLevel -> Int
sizeOf HaskellDispLevel
_ = ((Int
4))
{-# LINE 427 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 428 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
value :: CInt <- peek (castPtr ptr)
case value of
0 -> pure Operator
_ -> pure Expert
poke :: Ptr HaskellDispLevel -> HaskellDispLevel -> IO ()
poke Ptr HaskellDispLevel
ptr HaskellDispLevel
x = forall a. Storable a => Ptr a -> a -> IO ()
poke @CInt (Ptr HaskellDispLevel -> Ptr CInt
forall a b. Ptr a -> Ptr b
castPtr Ptr HaskellDispLevel
ptr) (if HaskellDispLevel
x HaskellDispLevel -> HaskellDispLevel -> Bool
forall a. Eq a => a -> a -> Bool
== HaskellDispLevel
Operator then CInt
0 else CInt
1)
data HaskellVarLongStringArray = HaskellVarLongStringArray
{ HaskellVarLongStringArray -> Word32
longLength :: !Word32,
HaskellVarLongStringArray -> Ptr Word64
longSequence :: !(Ptr Word64),
HaskellVarLongStringArray -> Word32
longStringLength :: !Word32,
HaskellVarLongStringArray -> Ptr CString
longStringSequence :: !(Ptr CString)
}
deriving (Int -> HaskellVarLongStringArray -> String -> String
[HaskellVarLongStringArray] -> String -> String
HaskellVarLongStringArray -> String
(Int -> HaskellVarLongStringArray -> String -> String)
-> (HaskellVarLongStringArray -> String)
-> ([HaskellVarLongStringArray] -> String -> String)
-> Show HaskellVarLongStringArray
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellVarLongStringArray -> String -> String
showsPrec :: Int -> HaskellVarLongStringArray -> String -> String
$cshow :: HaskellVarLongStringArray -> String
show :: HaskellVarLongStringArray -> String
$cshowList :: [HaskellVarLongStringArray] -> String -> String
showList :: [HaskellVarLongStringArray] -> String -> String
Show)
instance Storable HaskellVarLongStringArray where
sizeOf :: HaskellVarLongStringArray -> Int
sizeOf HaskellVarLongStringArray
_ = ((Int
32))
{-# LINE 445 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 446 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
long_length' <- (((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr)
{-# LINE 448 "lib/Tango/Raw/Common.hsc" #-}
long_sequence' <- (((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr)
{-# LINE 449 "lib/Tango/Raw/Common.hsc" #-}
string_length' <- (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 450 "lib/Tango/Raw/Common.hsc" #-}
string_sequence' <- (((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr)
{-# LINE 451 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellVarLongStringArray long_length' long_sequence' string_length' string_sequence')
poke :: Ptr HaskellVarLongStringArray -> HaskellVarLongStringArray -> IO ()
poke Ptr HaskellVarLongStringArray
ptr (HaskellVarLongStringArray Word32
longLength' Ptr Word64
longSequence' Word32
stringLength' Ptr CString
stringSequence') = do
((\Ptr HaskellVarLongStringArray
hsc_ptr -> Ptr HaskellVarLongStringArray -> Int -> Word32 -> IO ()
forall b. Ptr b -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HaskellVarLongStringArray
hsc_ptr Int
0)) Ptr HaskellVarLongStringArray
ptr Word32
longLength'
{-# LINE 454 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr longSequence'
{-# LINE 455 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr stringLength'
{-# LINE 456 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr stringSequence'
{-# LINE 457 "lib/Tango/Raw/Common.hsc" #-}
data HaskellVarDoubleStringArray = HaskellVarDoubleStringArray
{ HaskellVarDoubleStringArray -> Word32
doubleLength :: !Word32,
HaskellVarDoubleStringArray -> Ptr CDouble
doubleSequence :: !(Ptr CDouble),
HaskellVarDoubleStringArray -> Word32
doubleStringLength :: !Word32,
HaskellVarDoubleStringArray -> Ptr CString
doubleStringSequence :: !(Ptr CString)
}
deriving (Int -> HaskellVarDoubleStringArray -> String -> String
[HaskellVarDoubleStringArray] -> String -> String
HaskellVarDoubleStringArray -> String
(Int -> HaskellVarDoubleStringArray -> String -> String)
-> (HaskellVarDoubleStringArray -> String)
-> ([HaskellVarDoubleStringArray] -> String -> String)
-> Show HaskellVarDoubleStringArray
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellVarDoubleStringArray -> String -> String
showsPrec :: Int -> HaskellVarDoubleStringArray -> String -> String
$cshow :: HaskellVarDoubleStringArray -> String
show :: HaskellVarDoubleStringArray -> String
$cshowList :: [HaskellVarDoubleStringArray] -> String -> String
showList :: [HaskellVarDoubleStringArray] -> String -> String
Show)
instance Storable HaskellVarDoubleStringArray where
sizeOf :: HaskellVarDoubleStringArray -> Int
sizeOf HaskellVarDoubleStringArray
_ = ((Int
32))
{-# LINE 468 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 469 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
double_length' <- (((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr)
{-# LINE 471 "lib/Tango/Raw/Common.hsc" #-}
double_sequence' <- (((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr)
{-# LINE 472 "lib/Tango/Raw/Common.hsc" #-}
string_length' <- (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 473 "lib/Tango/Raw/Common.hsc" #-}
string_sequence' <- (((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr)
{-# LINE 474 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellVarDoubleStringArray double_length' double_sequence' string_length' string_sequence')
poke :: Ptr HaskellVarDoubleStringArray
-> HaskellVarDoubleStringArray -> IO ()
poke Ptr HaskellVarDoubleStringArray
ptr (HaskellVarDoubleStringArray Word32
doubleLength' Ptr CDouble
doubleSequence' Word32
stringLength' Ptr CString
stringSequence') = do
((\Ptr HaskellVarDoubleStringArray
hsc_ptr -> Ptr HaskellVarDoubleStringArray -> Int -> Word32 -> IO ()
forall b. Ptr b -> Int -> Word32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HaskellVarDoubleStringArray
hsc_ptr Int
0)) Ptr HaskellVarDoubleStringArray
ptr Word32
doubleLength'
{-# LINE 477 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr doubleSequence'
{-# LINE 478 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr stringLength'
{-# LINE 479 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr stringSequence'
{-# LINE 480 "lib/Tango/Raw/Common.hsc" #-}
data HaskellTangoDevEncoded = HaskellTangoDevEncoded
{ HaskellTangoDevEncoded -> CString
devEncodedFormat :: !CString,
HaskellTangoDevEncoded -> Word32
devEncodedLength :: !Word32,
HaskellTangoDevEncoded -> Ptr Word8
devEncodedData :: !(Ptr Word8)
}
deriving (Int -> HaskellTangoDevEncoded -> String -> String
[HaskellTangoDevEncoded] -> String -> String
HaskellTangoDevEncoded -> String
(Int -> HaskellTangoDevEncoded -> String -> String)
-> (HaskellTangoDevEncoded -> String)
-> ([HaskellTangoDevEncoded] -> String -> String)
-> Show HaskellTangoDevEncoded
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellTangoDevEncoded -> String -> String
showsPrec :: Int -> HaskellTangoDevEncoded -> String -> String
$cshow :: HaskellTangoDevEncoded -> String
show :: HaskellTangoDevEncoded -> String
$cshowList :: [HaskellTangoDevEncoded] -> String -> String
showList :: [HaskellTangoDevEncoded] -> String -> String
Show, (forall x. HaskellTangoDevEncoded -> Rep HaskellTangoDevEncoded x)
-> (forall x.
Rep HaskellTangoDevEncoded x -> HaskellTangoDevEncoded)
-> Generic HaskellTangoDevEncoded
forall x. Rep HaskellTangoDevEncoded x -> HaskellTangoDevEncoded
forall x. HaskellTangoDevEncoded -> Rep HaskellTangoDevEncoded x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HaskellTangoDevEncoded -> Rep HaskellTangoDevEncoded x
from :: forall x. HaskellTangoDevEncoded -> Rep HaskellTangoDevEncoded x
$cto :: forall x. Rep HaskellTangoDevEncoded x -> HaskellTangoDevEncoded
to :: forall x. Rep HaskellTangoDevEncoded x -> HaskellTangoDevEncoded
Generic)
instance GStorable HaskellTangoDevEncoded
data HaskellAttributeInfo = HaskellAttributeInfo
{ HaskellAttributeInfo -> CString
attributeInfoName :: !CString,
HaskellAttributeInfo -> HaskellAttrWriteType
attributeInfoWritable :: !HaskellAttrWriteType,
HaskellAttributeInfo -> HaskellDataFormat
attributeInfoDataFormat :: !HaskellDataFormat,
HaskellAttributeInfo -> HaskellTangoDataType
attributeInfoDataType :: !HaskellTangoDataType,
HaskellAttributeInfo -> Int32
attributeInfoMaxDimX :: !Int32,
HaskellAttributeInfo -> Int32
attributeInfoMaxDimY :: !Int32,
HaskellAttributeInfo -> CString
attributeInfoDescription :: !CString,
HaskellAttributeInfo -> CString
attributeInfoLabel :: !CString,
HaskellAttributeInfo -> CString
attributeInfoUnit :: !CString,
HaskellAttributeInfo -> CString
attributeInfoStandardUnit :: !CString,
HaskellAttributeInfo -> CString
attributeInfoDisplayUnit :: !CString,
HaskellAttributeInfo -> CString
attributeInfoFormat :: !CString,
HaskellAttributeInfo -> CString
attributeInfoMinValue :: !CString,
HaskellAttributeInfo -> CString
attributeInfoMaxValue :: !CString,
HaskellAttributeInfo -> CString
attributeInfoMinAlarm :: !CString,
HaskellAttributeInfo -> CString
attributeInfoMaxAlarm :: !CString,
HaskellAttributeInfo -> CString
attributeInfoWritableAttrName :: !CString,
HaskellAttributeInfo -> HaskellDispLevel
attributeInfoDispLevel :: !HaskellDispLevel,
HaskellAttributeInfo -> Ptr CString
attributeInfoEnumLabels :: !(Ptr CString),
HaskellAttributeInfo -> Word16
attributeInfoEnumLabelsCount :: !Word16,
HaskellAttributeInfo -> CString
attributeInfoRootAttrName :: !CString,
HaskellAttributeInfo -> TangoAttrMemorizedType
attributeInfoMemorized :: !TangoAttrMemorizedType
}
deriving (Int -> HaskellAttributeInfo -> String -> String
[HaskellAttributeInfo] -> String -> String
HaskellAttributeInfo -> String
(Int -> HaskellAttributeInfo -> String -> String)
-> (HaskellAttributeInfo -> String)
-> ([HaskellAttributeInfo] -> String -> String)
-> Show HaskellAttributeInfo
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellAttributeInfo -> String -> String
showsPrec :: Int -> HaskellAttributeInfo -> String -> String
$cshow :: HaskellAttributeInfo -> String
show :: HaskellAttributeInfo -> String
$cshowList :: [HaskellAttributeInfo] -> String -> String
showList :: [HaskellAttributeInfo] -> String -> String
Show, (forall x. HaskellAttributeInfo -> Rep HaskellAttributeInfo x)
-> (forall x. Rep HaskellAttributeInfo x -> HaskellAttributeInfo)
-> Generic HaskellAttributeInfo
forall x. Rep HaskellAttributeInfo x -> HaskellAttributeInfo
forall x. HaskellAttributeInfo -> Rep HaskellAttributeInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HaskellAttributeInfo -> Rep HaskellAttributeInfo x
from :: forall x. HaskellAttributeInfo -> Rep HaskellAttributeInfo x
$cto :: forall x. Rep HaskellAttributeInfo x -> HaskellAttributeInfo
to :: forall x. Rep HaskellAttributeInfo x -> HaskellAttributeInfo
Generic)
instance GStorable HaskellAttributeInfo
data HaskellDbDatum = HaskellDbDatum
{ HaskellDbDatum -> CString
dbDatumPropertyName :: !CString,
HaskellDbDatum -> Bool
dbDatumIsEmpty :: !Bool,
HaskellDbDatum -> Bool
dbDatumWrongDataType :: !Bool,
HaskellDbDatum -> HaskellTangoDataType
dbDatumDataType :: !HaskellTangoDataType,
HaskellDbDatum -> HaskellTangoPropertyData
dbDatumPropData :: !HaskellTangoPropertyData
}
deriving (Int -> HaskellDbDatum -> String -> String
[HaskellDbDatum] -> String -> String
HaskellDbDatum -> String
(Int -> HaskellDbDatum -> String -> String)
-> (HaskellDbDatum -> String)
-> ([HaskellDbDatum] -> String -> String)
-> Show HaskellDbDatum
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDbDatum -> String -> String
showsPrec :: Int -> HaskellDbDatum -> String -> String
$cshow :: HaskellDbDatum -> String
show :: HaskellDbDatum -> String
$cshowList :: [HaskellDbDatum] -> String -> String
showList :: [HaskellDbDatum] -> String -> String
Show)
data HaskellAttributeData = HaskellAttributeData
{ HaskellAttributeData -> HaskellDataFormat
dataFormat :: !HaskellDataFormat,
HaskellAttributeData -> HaskellDataQuality
dataQuality :: !HaskellDataQuality,
HaskellAttributeData -> CLong
nbRead :: !CLong,
HaskellAttributeData -> CString
name :: !CString,
HaskellAttributeData -> Int32
dimX :: !Int32,
HaskellAttributeData -> Int32
dimY :: !Int32,
HaskellAttributeData -> Timeval
timeStamp :: !Timeval,
HaskellAttributeData -> HaskellTangoDataType
dataType :: !HaskellTangoDataType,
HaskellAttributeData -> HaskellTangoAttributeData
tangoAttributeData :: !HaskellTangoAttributeData
}
deriving (Int -> HaskellAttributeData -> String -> String
[HaskellAttributeData] -> String -> String
HaskellAttributeData -> String
(Int -> HaskellAttributeData -> String -> String)
-> (HaskellAttributeData -> String)
-> ([HaskellAttributeData] -> String -> String)
-> Show HaskellAttributeData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellAttributeData -> String -> String
showsPrec :: Int -> HaskellAttributeData -> String -> String
$cshow :: HaskellAttributeData -> String
show :: HaskellAttributeData -> String
$cshowList :: [HaskellAttributeData] -> String -> String
showList :: [HaskellAttributeData] -> String -> String
Show)
data HaskellCommandData = HaskellCommandData
{ HaskellCommandData -> HaskellTangoDataType
argType :: !HaskellTangoDataType,
HaskellCommandData -> HaskellTangoCommandData
tangoCommandData :: !HaskellTangoCommandData
}
deriving (Int -> HaskellCommandData -> String -> String
[HaskellCommandData] -> String -> String
HaskellCommandData -> String
(Int -> HaskellCommandData -> String -> String)
-> (HaskellCommandData -> String)
-> ([HaskellCommandData] -> String -> String)
-> Show HaskellCommandData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellCommandData -> String -> String
showsPrec :: Int -> HaskellCommandData -> String -> String
$cshow :: HaskellCommandData -> String
show :: HaskellCommandData -> String
$cshowList :: [HaskellCommandData] -> String -> String
showList :: [HaskellCommandData] -> String -> String
Show)
haskellDisplayLevelOperator :: CInt
haskellDisplayLevelOperator :: CInt
haskellDisplayLevelOperator = CInt
0
haskellDisplayLevelExpert :: CInt
haskellDisplayLevelExpert :: CInt
haskellDisplayLevelExpert = CInt
1
data HaskellCommandInfo = HaskellCommandInfo
{ HaskellCommandInfo -> CString
cmdName :: !CString,
HaskellCommandInfo -> Int32
cmdTag :: !Int32,
HaskellCommandInfo -> Int32
cmdInType :: !Int32,
HaskellCommandInfo -> Int32
cmdOutType :: !Int32,
HaskellCommandInfo -> CString
cmdInTypeDesc :: !CString,
HaskellCommandInfo -> CString
cmdOutTypeDesc :: !CString,
HaskellCommandInfo -> CInt
cmdDisplayLevel :: !CInt
}
deriving (Int -> HaskellCommandInfo -> String -> String
[HaskellCommandInfo] -> String -> String
HaskellCommandInfo -> String
(Int -> HaskellCommandInfo -> String -> String)
-> (HaskellCommandInfo -> String)
-> ([HaskellCommandInfo] -> String -> String)
-> Show HaskellCommandInfo
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellCommandInfo -> String -> String
showsPrec :: Int -> HaskellCommandInfo -> String -> String
$cshow :: HaskellCommandInfo -> String
show :: HaskellCommandInfo -> String
$cshowList :: [HaskellCommandInfo] -> String -> String
showList :: [HaskellCommandInfo] -> String -> String
Show)
instance Storable HaskellCommandInfo where
sizeOf :: HaskellCommandInfo -> Int
sizeOf HaskellCommandInfo
_ = ((Int
48))
{-# LINE 565 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 566 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
cmd_name' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 568 "lib/Tango/Raw/Common.hsc" #-}
cmd_tag' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 569 "lib/Tango/Raw/Common.hsc" #-}
in_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 570 "lib/Tango/Raw/Common.hsc" #-}
out_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr
{-# LINE 571 "lib/Tango/Raw/Common.hsc" #-}
in_type_desc' <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 572 "lib/Tango/Raw/Common.hsc" #-}
out_type_desc' <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 573 "lib/Tango/Raw/Common.hsc" #-}
disp_level' <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 574 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandInfo cmd_name' cmd_tag' in_type' out_type' in_type_desc' out_type_desc' disp_level')
poke :: Ptr HaskellCommandInfo -> HaskellCommandInfo -> IO ()
poke Ptr HaskellCommandInfo
ptr (HaskellCommandInfo CString
cmd_name' Int32
cmd_tag' Int32
in_type' Int32
out_type' CString
in_type_desc' CString
out_type_desc' CInt
disp_level') = do
((\Ptr HaskellCommandInfo
hsc_ptr -> Ptr HaskellCommandInfo -> Int -> CString -> IO ()
forall b. Ptr b -> Int -> CString -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HaskellCommandInfo
hsc_ptr Int
0)) Ptr HaskellCommandInfo
ptr CString
cmd_name'
{-# LINE 579 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr cmd_tag'
{-# LINE 580 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr in_type'
{-# LINE 581 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr out_type'
{-# LINE 582 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 24)) ptr in_type_desc'
{-# LINE 583 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr out_type_desc'
{-# LINE 584 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr disp_level'
{-# LINE 585 "lib/Tango/Raw/Common.hsc" #-}
qualityToHaskell :: CInt -> HaskellDataQuality
qualityToHaskell :: CInt -> HaskellDataQuality
qualityToHaskell CInt
0 = HaskellDataQuality
HaskellValid
qualityToHaskell CInt
1 = HaskellDataQuality
HaskellInvalid
qualityToHaskell CInt
2 = HaskellDataQuality
HaskellAlarm
qualityToHaskell CInt
3 = HaskellDataQuality
HaskellChanging
qualityToHaskell CInt
_ = HaskellDataQuality
HaskellWarning
instance Storable HaskellDbDatum where
sizeOf :: HaskellDbDatum -> Int
sizeOf HaskellDbDatum
_ = ((Int
40))
{-# LINE 595 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 596 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
property_name' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 598 "lib/Tango/Raw/Common.hsc" #-}
data_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 599 "lib/Tango/Raw/Common.hsc" #-}
is_empty' <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 600 "lib/Tango/Raw/Common.hsc" #-}
wrong_data_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 33)) ptr
{-# LINE 601 "lib/Tango/Raw/Common.hsc" #-}
let withoutType =
HaskellDbDatum
property_name'
is_empty'
wrong_data_type'
data_type'
case data_type' of
HaskellDevVoid -> error "encountered void type in DbDatum"
HaskellDevUnknown -> error "encountered unknown type in DbDatum"
HaskellDevEnum -> error "encountered enum in DbDatum"
HaskellDevBoolean -> (withoutType . HaskellPropBool) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 612 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevShort -> (withoutType . HaskellPropShort) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 613 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevLong -> (withoutType . HaskellPropLong) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 614 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevFloat -> (withoutType . HaskellPropFloat) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 615 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevDouble -> (withoutType . HaskellPropDouble) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 616 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevUShort -> (withoutType . HaskellPropUShort) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 617 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevULong -> (withoutType . HaskellPropULong) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 618 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevString -> (withoutType . HaskellPropString) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 619 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarCharArray -> error "type var char array not supported in dbdatum"
HaskellDevVarShortArray -> (withoutType . HaskellPropShortArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 621 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarStateArray -> error "type var state array not supported in dbdatum"
HaskellDevVarLongArray -> (withoutType . HaskellPropLongArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 623 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarFloatArray -> (withoutType . HaskellPropFloatArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 624 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarDoubleArray -> (withoutType . HaskellPropDoubleArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 625 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarUShortArray -> (withoutType . HaskellPropUShortArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 626 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarULongArray -> (withoutType . HaskellPropULongArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 627 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarStringArray -> (withoutType . HaskellPropStringArray) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 628 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarLongStringArray -> error "type long string array not supported in dbdatum"
HaskellDevVarDoubleStringArray -> error "type double string array not supported in dbdatum"
HaskellDevState -> error "type state not supported in dbdatum"
HaskellConstDevString -> error "type const dev string not supported in dbdatum"
HaskellDevVarBooleanArray -> do
propertyName <- peekCString property_name'
error ("encountered a property " <> show propertyName <> " with type boolean array -- this is not supported (yet)")
HaskellDevUChar -> error "type unsigned char not supported in dbdatum"
HaskellDevLong64 -> (withoutType . HaskellPropLong64) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 637 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevULong64 -> (withoutType . HaskellPropULong64) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 638 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevInt -> error "type int not supported in dbdatum"
HaskellDevEncoded -> error "type encoded not supported in dbdatum"
HaskellDevVarEncodedArray -> error "type encoded array not supported in dbdatum"
HaskellDevVarLong64Array -> (withoutType . HaskellPropLong64Array) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 642 "lib/Tango/Raw/Common.hsc" #-}
HaskellDevVarULong64Array -> (withoutType . HaskellPropULong64Array) <$> (((\hsc_ptr -> peekByteOff hsc_ptr 16)) ptr)
{-# LINE 643 "lib/Tango/Raw/Common.hsc" #-}
poke ptr haskellDbDatum = do
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr (dbDatumPropertyName haskellDbDatum)
{-# LINE 645 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 32)) ptr (dbDatumIsEmpty haskellDbDatum)
{-# LINE 646 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 33)) ptr (dbDatumWrongDataType haskellDbDatum)
{-# LINE 647 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr (dbDatumDataType haskellDbDatum)
{-# LINE 648 "lib/Tango/Raw/Common.hsc" #-}
case dbDatumPropData haskellDbDatum of
HaskellPropDoubleArray doubles' -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr doubles'
{-# LINE 651 "lib/Tango/Raw/Common.hsc" #-}
HaskellPropStringArray strings' -> do
((\hsc_ptr -> pokeByteOff hsc_ptr 16)) ptr strings'
{-# LINE 653 "lib/Tango/Raw/Common.hsc" #-}
_ -> pure ()
instance Storable HaskellAttributeData where
sizeOf :: HaskellAttributeData -> Int
sizeOf HaskellAttributeData
_ = ((Int
72))
{-# LINE 658 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 659 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
data_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 661 "lib/Tango/Raw/Common.hsc" #-}
dim_x' <- ((\hsc_ptr -> peekByteOff hsc_ptr 48)) ptr
{-# LINE 662 "lib/Tango/Raw/Common.hsc" #-}
dim_y' <- ((\hsc_ptr -> peekByteOff hsc_ptr 52)) ptr
{-# LINE 663 "lib/Tango/Raw/Common.hsc" #-}
name' <- ((\hsc_ptr -> peekByteOff hsc_ptr 40)) ptr
{-# LINE 664 "lib/Tango/Raw/Common.hsc" #-}
nb_read' <- ((\hsc_ptr -> peekByteOff hsc_ptr 32)) ptr
{-# LINE 665 "lib/Tango/Raw/Common.hsc" #-}
quality' <- ((\hsc_ptr -> peekByteOff hsc_ptr 28)) ptr
{-# LINE 666 "lib/Tango/Raw/Common.hsc" #-}
data_format' <- ((\hsc_ptr -> peekByteOff hsc_ptr 24)) ptr
{-# LINE 667 "lib/Tango/Raw/Common.hsc" #-}
time_stamp' <- ((\hsc_ptr -> peekByteOff hsc_ptr 56)) ptr
{-# LINE 668 "lib/Tango/Raw/Common.hsc" #-}
let withoutType =
HaskellAttributeData
data_format'
(qualityToHaskell quality')
nb_read'
name'
dim_x'
dim_y'
time_stamp'
data_type'
case data_type' of
HaskellDevUnknown -> error "encountered DevUnknown data type"
HaskellDevVoid -> error "encountered DevVoid data type"
HaskellDevVarEncodedArray -> error "encountered DevVarEncodedArray data type"
HaskellDevBoolean -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 684 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataBoolArray attr_data'))
HaskellDevShort -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 687 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataShortArray attr_data'))
HaskellDevLong -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 690 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataLongArray attr_data'))
HaskellDevFloat -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 693 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataFloatArray attr_data'))
HaskellDevDouble -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 696 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataDoubleArray attr_data'))
HaskellDevUShort -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 699 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataUShortArray attr_data'))
HaskellDevULong -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 702 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataULongArray attr_data'))
HaskellDevString -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 705 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataStringArray attr_data'))
HaskellDevVarCharArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 708 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataCharArray attr_data'))
HaskellDevVarStateArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 711 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataStateArray attr_data'))
HaskellDevVarShortArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 714 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataShortArray attr_data'))
HaskellDevVarLongArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 717 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataLongArray attr_data'))
HaskellDevVarFloatArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 720 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataFloatArray attr_data'))
HaskellDevVarDoubleArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 723 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataDoubleArray attr_data'))
HaskellDevVarUShortArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 726 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataUShortArray attr_data'))
HaskellDevVarULongArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 729 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataULongArray attr_data'))
HaskellDevVarStringArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 732 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataStringArray attr_data'))
HaskellDevVarLongStringArray -> error "long string arrays are not supported right now"
HaskellDevVarDoubleStringArray -> error "double string arrays are not supported right now"
HaskellDevState -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 737 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataStateArray attr_data'))
HaskellConstDevString -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 740 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataStringArray attr_data'))
HaskellDevUChar -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 743 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataCharArray attr_data'))
HaskellDevVarBooleanArray -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 746 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataBoolArray attr_data'))
HaskellDevLong64 -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 749 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataLong64Array attr_data'))
HaskellDevULong64 -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 752 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataULong64Array attr_data'))
HaskellDevVarLong64Array -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 755 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataLong64Array attr_data'))
HaskellDevVarULong64Array -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 758 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataULong64Array attr_data'))
HaskellDevInt -> error "int arrays are not supported right now"
HaskellDevEncoded -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 762 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataEncodedArray attr_data'))
HaskellDevEnum -> do
attr_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 765 "lib/Tango/Raw/Common.hsc" #-}
pure (withoutType (HaskellAttributeDataShortArray attr_data'))
poke :: Ptr HaskellAttributeData -> HaskellAttributeData -> IO ()
poke Ptr HaskellAttributeData
ptr HaskellAttributeData
haskellAttributeData = do
((\Ptr HaskellAttributeData
hsc_ptr -> Ptr HaskellAttributeData -> Int -> Int32 -> IO ()
forall b. Ptr b -> Int -> Int32 -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HaskellAttributeData
hsc_ptr Int
48)) Ptr HaskellAttributeData
ptr (HaskellAttributeData -> Int32
dimX HaskellAttributeData
haskellAttributeData)
{-# LINE 768 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 52)) ptr (dimY haskellAttributeData)
{-# LINE 769 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 40)) ptr (name haskellAttributeData)
{-# LINE 770 "lib/Tango/Raw/Common.hsc" #-}
((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr (dataType haskellAttributeData)
{-# LINE 771 "lib/Tango/Raw/Common.hsc" #-}
case tangoAttributeData haskellAttributeData of
HaskellAttributeDataBoolArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 773 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataCharArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 774 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataShortArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 775 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataUShortArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 776 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataLongArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 777 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataULongArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 778 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataLong64Array v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 779 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataULong64Array v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 780 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataFloatArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 781 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataDoubleArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 782 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataStringArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 783 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataStateArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 784 "lib/Tango/Raw/Common.hsc" #-}
HaskellAttributeDataEncodedArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 785 "lib/Tango/Raw/Common.hsc" #-}
instance Storable HaskellCommandData where
sizeOf :: HaskellCommandData -> Int
sizeOf HaskellCommandData
_ = ((Int
40))
{-# LINE 788 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (8)
{-# LINE 789 "lib/Tango/Raw/Common.hsc" #-}
peek ptr = do
data_type' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 791 "lib/Tango/Raw/Common.hsc" #-}
case data_type' of
HaskellDevVoid -> pure (HaskellCommandData data_type' HaskellCommandVoid)
HaskellDevBoolean -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 795 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandBool cmd_data'))
HaskellDevShort -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 798 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandShort cmd_data'))
HaskellDevUShort -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 801 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandUShort cmd_data'))
HaskellDevInt -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 805 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandInt32 cmd_data'))
HaskellDevFloat -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 808 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandFloat cmd_data'))
HaskellDevDouble -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 811 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandDouble cmd_data'))
HaskellDevString -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 814 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandCString cmd_data'))
HaskellDevLong64 -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 817 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandLong64 cmd_data'))
HaskellDevState -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 820 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandDevState cmd_data'))
HaskellDevULong64 -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 823 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandULong64 cmd_data'))
HaskellDevEncoded -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 826 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandDevEncoded cmd_data'))
HaskellDevEnum -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 829 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandDevEnum cmd_data'))
HaskellDevVarBooleanArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 832 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarBool cmd_data'))
HaskellDevVarCharArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 835 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarChar cmd_data'))
HaskellDevVarShortArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 838 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarShort cmd_data'))
HaskellDevVarUShortArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 841 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarUShort cmd_data'))
HaskellDevVarLongArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 844 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarLong cmd_data'))
HaskellDevVarULongArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 847 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarULong cmd_data'))
HaskellDevVarLong64Array -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 850 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarLong64 cmd_data'))
HaskellDevVarULong64Array -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 853 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarULong64 cmd_data'))
HaskellDevVarFloatArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 856 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarFloat cmd_data'))
HaskellDevVarDoubleArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 859 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarDouble cmd_data'))
HaskellDevVarStringArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 862 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandVarCString cmd_data'))
HaskellDevVarLongStringArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 869 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandLongStringArray cmd_data'))
HaskellDevVarDoubleStringArray -> do
cmd_data' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 872 "lib/Tango/Raw/Common.hsc" #-}
pure (HaskellCommandData data_type' (HaskellCommandDoubleStringArray cmd_data'))
_ -> error "shit"
poke :: Ptr HaskellCommandData -> HaskellCommandData -> IO ()
poke Ptr HaskellCommandData
ptr (HaskellCommandData HaskellTangoDataType
argType' HaskellTangoCommandData
tangoCommandData') = do
((\Ptr HaskellCommandData
hsc_ptr -> Ptr HaskellCommandData -> Int -> HaskellTangoDataType -> IO ()
forall b. Ptr b -> Int -> HaskellTangoDataType -> IO ()
forall a b. Storable a => Ptr b -> Int -> a -> IO ()
pokeByteOff Ptr HaskellCommandData
hsc_ptr Int
0)) Ptr HaskellCommandData
ptr HaskellTangoDataType
argType'
{-# LINE 876 "lib/Tango/Raw/Common.hsc" #-}
case tangoCommandData' of
HaskellCommandVoid -> pure ()
HaskellCommandBool v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 879 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandShort v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 880 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandUShort v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 881 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandInt32 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 882 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandUInt32 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 883 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandFloat v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 884 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandDouble v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 885 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandCString v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 886 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandLong64 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 887 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandDevState v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 888 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandULong64 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 889 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandDevEncoded v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 890 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarBool v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 891 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarChar v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 892 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarShort v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 893 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarUShort v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 894 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarLong v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 895 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarULong v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 896 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarLong64 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 897 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarULong64 v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 898 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarFloat v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 899 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarDouble v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 900 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarCString v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 901 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandVarDevState v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 902 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandLongStringArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 903 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandDoubleStringArray v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 904 "lib/Tango/Raw/Common.hsc" #-}
HaskellCommandDevEnum v -> ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr v
{-# LINE 905 "lib/Tango/Raw/Common.hsc" #-}
data ErrSeverity
= Warn
| Err
| Panic
deriving (Int -> ErrSeverity -> String -> String
[ErrSeverity] -> String -> String
ErrSeverity -> String
(Int -> ErrSeverity -> String -> String)
-> (ErrSeverity -> String)
-> ([ErrSeverity] -> String -> String)
-> Show ErrSeverity
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> ErrSeverity -> String -> String
showsPrec :: Int -> ErrSeverity -> String -> String
$cshow :: ErrSeverity -> String
show :: ErrSeverity -> String
$cshowList :: [ErrSeverity] -> String -> String
showList :: [ErrSeverity] -> String -> String
Show, ErrSeverity -> ErrSeverity -> Bool
(ErrSeverity -> ErrSeverity -> Bool)
-> (ErrSeverity -> ErrSeverity -> Bool) -> Eq ErrSeverity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ErrSeverity -> ErrSeverity -> Bool
== :: ErrSeverity -> ErrSeverity -> Bool
$c/= :: ErrSeverity -> ErrSeverity -> Bool
/= :: ErrSeverity -> ErrSeverity -> Bool
Eq, ErrSeverity
ErrSeverity -> ErrSeverity -> Bounded ErrSeverity
forall a. a -> a -> Bounded a
$cminBound :: ErrSeverity
minBound :: ErrSeverity
$cmaxBound :: ErrSeverity
maxBound :: ErrSeverity
Bounded, Int -> ErrSeverity
ErrSeverity -> Int
ErrSeverity -> [ErrSeverity]
ErrSeverity -> ErrSeverity
ErrSeverity -> ErrSeverity -> [ErrSeverity]
ErrSeverity -> ErrSeverity -> ErrSeverity -> [ErrSeverity]
(ErrSeverity -> ErrSeverity)
-> (ErrSeverity -> ErrSeverity)
-> (Int -> ErrSeverity)
-> (ErrSeverity -> Int)
-> (ErrSeverity -> [ErrSeverity])
-> (ErrSeverity -> ErrSeverity -> [ErrSeverity])
-> (ErrSeverity -> ErrSeverity -> [ErrSeverity])
-> (ErrSeverity -> ErrSeverity -> ErrSeverity -> [ErrSeverity])
-> Enum ErrSeverity
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
$csucc :: ErrSeverity -> ErrSeverity
succ :: ErrSeverity -> ErrSeverity
$cpred :: ErrSeverity -> ErrSeverity
pred :: ErrSeverity -> ErrSeverity
$ctoEnum :: Int -> ErrSeverity
toEnum :: Int -> ErrSeverity
$cfromEnum :: ErrSeverity -> Int
fromEnum :: ErrSeverity -> Int
$cenumFrom :: ErrSeverity -> [ErrSeverity]
enumFrom :: ErrSeverity -> [ErrSeverity]
$cenumFromThen :: ErrSeverity -> ErrSeverity -> [ErrSeverity]
enumFromThen :: ErrSeverity -> ErrSeverity -> [ErrSeverity]
$cenumFromTo :: ErrSeverity -> ErrSeverity -> [ErrSeverity]
enumFromTo :: ErrSeverity -> ErrSeverity -> [ErrSeverity]
$cenumFromThenTo :: ErrSeverity -> ErrSeverity -> ErrSeverity -> [ErrSeverity]
enumFromThenTo :: ErrSeverity -> ErrSeverity -> ErrSeverity -> [ErrSeverity]
Enum)
instance Storable ErrSeverity where
sizeOf :: ErrSeverity -> Int
sizeOf ErrSeverity
_ = ((Int
4))
{-# LINE 915 "lib/Tango/Raw/Common.hsc" #-}
alignment _ = (4)
{-# LINE 916 "lib/Tango/Raw/Common.hsc" #-}
peek = peekBounded "ErrSeverity"
poke :: Ptr ErrSeverity -> ErrSeverity -> IO ()
poke = String -> Ptr ErrSeverity -> ErrSeverity -> IO ()
forall a.
(Show a, Eq a, Enum a, Bounded a) =>
String -> Ptr a -> a -> IO ()
pokeBounded String
"ErrSeverity"
data DevFailed a = DevFailed
{
forall a. DevFailed a -> a
devFailedDesc :: !a,
forall a. DevFailed a -> a
devFailedReason :: !a,
forall a. DevFailed a -> a
devFailedOrigin :: !a,
forall a. DevFailed a -> ErrSeverity
devFailedSeverity :: !ErrSeverity
}
deriving ((forall a b. (a -> b) -> DevFailed a -> DevFailed b)
-> (forall a b. a -> DevFailed b -> DevFailed a)
-> Functor DevFailed
forall a b. a -> DevFailed b -> DevFailed a
forall a b. (a -> b) -> DevFailed a -> DevFailed b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> DevFailed a -> DevFailed b
fmap :: forall a b. (a -> b) -> DevFailed a -> DevFailed b
$c<$ :: forall a b. a -> DevFailed b -> DevFailed a
<$ :: forall a b. a -> DevFailed b -> DevFailed a
Functor, (forall m. Monoid m => DevFailed m -> m)
-> (forall m a. Monoid m => (a -> m) -> DevFailed a -> m)
-> (forall m a. Monoid m => (a -> m) -> DevFailed a -> m)
-> (forall a b. (a -> b -> b) -> b -> DevFailed a -> b)
-> (forall a b. (a -> b -> b) -> b -> DevFailed a -> b)
-> (forall b a. (b -> a -> b) -> b -> DevFailed a -> b)
-> (forall b a. (b -> a -> b) -> b -> DevFailed a -> b)
-> (forall a. (a -> a -> a) -> DevFailed a -> a)
-> (forall a. (a -> a -> a) -> DevFailed a -> a)
-> (forall a. DevFailed a -> [a])
-> (forall a. DevFailed a -> Bool)
-> (forall a. DevFailed a -> Int)
-> (forall a. Eq a => a -> DevFailed a -> Bool)
-> (forall a. Ord a => DevFailed a -> a)
-> (forall a. Ord a => DevFailed a -> a)
-> (forall a. Num a => DevFailed a -> a)
-> (forall a. Num a => DevFailed a -> a)
-> Foldable DevFailed
forall a. Eq a => a -> DevFailed a -> Bool
forall a. Num a => DevFailed a -> a
forall a. Ord a => DevFailed a -> a
forall m. Monoid m => DevFailed m -> m
forall a. DevFailed a -> Bool
forall a. DevFailed a -> Int
forall a. DevFailed a -> [a]
forall a. (a -> a -> a) -> DevFailed a -> a
forall m a. Monoid m => (a -> m) -> DevFailed a -> m
forall b a. (b -> a -> b) -> b -> DevFailed a -> b
forall a b. (a -> b -> b) -> b -> DevFailed a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
$cfold :: forall m. Monoid m => DevFailed m -> m
fold :: forall m. Monoid m => DevFailed m -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> DevFailed a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> DevFailed a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> DevFailed a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> DevFailed a -> m
$cfoldr :: forall a b. (a -> b -> b) -> b -> DevFailed a -> b
foldr :: forall a b. (a -> b -> b) -> b -> DevFailed a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> DevFailed a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> DevFailed a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> DevFailed a -> b
foldl :: forall b a. (b -> a -> b) -> b -> DevFailed a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> DevFailed a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> DevFailed a -> b
$cfoldr1 :: forall a. (a -> a -> a) -> DevFailed a -> a
foldr1 :: forall a. (a -> a -> a) -> DevFailed a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> DevFailed a -> a
foldl1 :: forall a. (a -> a -> a) -> DevFailed a -> a
$ctoList :: forall a. DevFailed a -> [a]
toList :: forall a. DevFailed a -> [a]
$cnull :: forall a. DevFailed a -> Bool
null :: forall a. DevFailed a -> Bool
$clength :: forall a. DevFailed a -> Int
length :: forall a. DevFailed a -> Int
$celem :: forall a. Eq a => a -> DevFailed a -> Bool
elem :: forall a. Eq a => a -> DevFailed a -> Bool
$cmaximum :: forall a. Ord a => DevFailed a -> a
maximum :: forall a. Ord a => DevFailed a -> a
$cminimum :: forall a. Ord a => DevFailed a -> a
minimum :: forall a. Ord a => DevFailed a -> a
$csum :: forall a. Num a => DevFailed a -> a
sum :: forall a. Num a => DevFailed a -> a
$cproduct :: forall a. Num a => DevFailed a -> a
product :: forall a. Num a => DevFailed a -> a
Foldable, Functor DevFailed
Foldable DevFailed
(Functor DevFailed, Foldable DevFailed) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DevFailed a -> f (DevFailed b))
-> (forall (f :: * -> *) a.
Applicative f =>
DevFailed (f a) -> f (DevFailed a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DevFailed a -> m (DevFailed b))
-> (forall (m :: * -> *) a.
Monad m =>
DevFailed (m a) -> m (DevFailed a))
-> Traversable DevFailed
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
DevFailed (m a) -> m (DevFailed a)
forall (f :: * -> *) a.
Applicative f =>
DevFailed (f a) -> f (DevFailed a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DevFailed a -> m (DevFailed b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DevFailed a -> f (DevFailed b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DevFailed a -> f (DevFailed b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DevFailed a -> f (DevFailed b)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
DevFailed (f a) -> f (DevFailed a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
DevFailed (f a) -> f (DevFailed a)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DevFailed a -> m (DevFailed b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DevFailed a -> m (DevFailed b)
$csequence :: forall (m :: * -> *) a.
Monad m =>
DevFailed (m a) -> m (DevFailed a)
sequence :: forall (m :: * -> *) a.
Monad m =>
DevFailed (m a) -> m (DevFailed a)
Traversable, (forall x. DevFailed a -> Rep (DevFailed a) x)
-> (forall x. Rep (DevFailed a) x -> DevFailed a)
-> Generic (DevFailed a)
forall x. Rep (DevFailed a) x -> DevFailed a
forall x. DevFailed a -> Rep (DevFailed a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (DevFailed a) x -> DevFailed a
forall a x. DevFailed a -> Rep (DevFailed a) x
$cfrom :: forall a x. DevFailed a -> Rep (DevFailed a) x
from :: forall x. DevFailed a -> Rep (DevFailed a) x
$cto :: forall a x. Rep (DevFailed a) x -> DevFailed a
to :: forall x. Rep (DevFailed a) x -> DevFailed a
Generic, Int -> DevFailed a -> String -> String
[DevFailed a] -> String -> String
DevFailed a -> String
(Int -> DevFailed a -> String -> String)
-> (DevFailed a -> String)
-> ([DevFailed a] -> String -> String)
-> Show (DevFailed a)
forall a. Show a => Int -> DevFailed a -> String -> String
forall a. Show a => [DevFailed a] -> String -> String
forall a. Show a => DevFailed a -> String
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: forall a. Show a => Int -> DevFailed a -> String -> String
showsPrec :: Int -> DevFailed a -> String -> String
$cshow :: forall a. Show a => DevFailed a -> String
show :: DevFailed a -> String
$cshowList :: forall a. Show a => [DevFailed a] -> String -> String
showList :: [DevFailed a] -> String -> String
Show)
instance (Storable a) => GStorable (DevFailed a)
data HaskellErrorStack = HaskellErrorStack
{ HaskellErrorStack -> Word32
errorStackLength :: !Word32,
HaskellErrorStack -> Ptr (DevFailed CString)
errorStackSequence :: !(Ptr (DevFailed CString))
}
deriving ((forall x. HaskellErrorStack -> Rep HaskellErrorStack x)
-> (forall x. Rep HaskellErrorStack x -> HaskellErrorStack)
-> Generic HaskellErrorStack
forall x. Rep HaskellErrorStack x -> HaskellErrorStack
forall x. HaskellErrorStack -> Rep HaskellErrorStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HaskellErrorStack -> Rep HaskellErrorStack x
from :: forall x. HaskellErrorStack -> Rep HaskellErrorStack x
$cto :: forall x. Rep HaskellErrorStack x -> HaskellErrorStack
to :: forall x. Rep HaskellErrorStack x -> HaskellErrorStack
Generic)
instance GStorable HaskellErrorStack
data HaskellDbData = HaskellDbData
{ HaskellDbData -> Word32
dbDataLength :: Word32,
HaskellDbData -> Ptr HaskellDbDatum
dbDataSequence :: Ptr HaskellDbDatum
}
deriving (Int -> HaskellDbData -> String -> String
[HaskellDbData] -> String -> String
HaskellDbData -> String
(Int -> HaskellDbData -> String -> String)
-> (HaskellDbData -> String)
-> ([HaskellDbData] -> String -> String)
-> Show HaskellDbData
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellDbData -> String -> String
showsPrec :: Int -> HaskellDbData -> String -> String
$cshow :: HaskellDbData -> String
show :: HaskellDbData -> String
$cshowList :: [HaskellDbData] -> String -> String
showList :: [HaskellDbData] -> String -> String
Show, (forall x. HaskellDbData -> Rep HaskellDbData x)
-> (forall x. Rep HaskellDbData x -> HaskellDbData)
-> Generic HaskellDbData
forall x. Rep HaskellDbData x -> HaskellDbData
forall x. HaskellDbData -> Rep HaskellDbData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HaskellDbData -> Rep HaskellDbData x
from :: forall x. HaskellDbData -> Rep HaskellDbData x
$cto :: forall x. Rep HaskellDbData x -> HaskellDbData
to :: forall x. Rep HaskellDbData x -> HaskellDbData
Generic)
instance GStorable HaskellDbData
data HaskellCommandInfoList = HaskellCommandInfoList
{ HaskellCommandInfoList -> Word32
commandInfoLength :: Word32,
HaskellCommandInfoList -> Ptr HaskellCommandInfo
commandInfoSequence :: Ptr HaskellCommandInfo
}
deriving (Int -> HaskellCommandInfoList -> String -> String
[HaskellCommandInfoList] -> String -> String
HaskellCommandInfoList -> String
(Int -> HaskellCommandInfoList -> String -> String)
-> (HaskellCommandInfoList -> String)
-> ([HaskellCommandInfoList] -> String -> String)
-> Show HaskellCommandInfoList
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellCommandInfoList -> String -> String
showsPrec :: Int -> HaskellCommandInfoList -> String -> String
$cshow :: HaskellCommandInfoList -> String
show :: HaskellCommandInfoList -> String
$cshowList :: [HaskellCommandInfoList] -> String -> String
showList :: [HaskellCommandInfoList] -> String -> String
Show, (forall x. HaskellCommandInfoList -> Rep HaskellCommandInfoList x)
-> (forall x.
Rep HaskellCommandInfoList x -> HaskellCommandInfoList)
-> Generic HaskellCommandInfoList
forall x. Rep HaskellCommandInfoList x -> HaskellCommandInfoList
forall x. HaskellCommandInfoList -> Rep HaskellCommandInfoList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. HaskellCommandInfoList -> Rep HaskellCommandInfoList x
from :: forall x. HaskellCommandInfoList -> Rep HaskellCommandInfoList x
$cto :: forall x. Rep HaskellCommandInfoList x -> HaskellCommandInfoList
to :: forall x. Rep HaskellCommandInfoList x -> HaskellCommandInfoList
Generic)
instance GStorable HaskellCommandInfoList
data HaskellAttributeInfoList = HaskellAttributeInfoList
{ HaskellAttributeInfoList -> Word32
attributeInfoListLength :: Word32,
HaskellAttributeInfoList -> Ptr HaskellAttributeInfo
attributeInfoListSequence :: Ptr HaskellAttributeInfo
}
deriving (Int -> HaskellAttributeInfoList -> String -> String
[HaskellAttributeInfoList] -> String -> String
HaskellAttributeInfoList -> String
(Int -> HaskellAttributeInfoList -> String -> String)
-> (HaskellAttributeInfoList -> String)
-> ([HaskellAttributeInfoList] -> String -> String)
-> Show HaskellAttributeInfoList
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellAttributeInfoList -> String -> String
showsPrec :: Int -> HaskellAttributeInfoList -> String -> String
$cshow :: HaskellAttributeInfoList -> String
show :: HaskellAttributeInfoList -> String
$cshowList :: [HaskellAttributeInfoList] -> String -> String
showList :: [HaskellAttributeInfoList] -> String -> String
Show, (forall x.
HaskellAttributeInfoList -> Rep HaskellAttributeInfoList x)
-> (forall x.
Rep HaskellAttributeInfoList x -> HaskellAttributeInfoList)
-> Generic HaskellAttributeInfoList
forall x.
Rep HaskellAttributeInfoList x -> HaskellAttributeInfoList
forall x.
HaskellAttributeInfoList -> Rep HaskellAttributeInfoList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
HaskellAttributeInfoList -> Rep HaskellAttributeInfoList x
from :: forall x.
HaskellAttributeInfoList -> Rep HaskellAttributeInfoList x
$cto :: forall x.
Rep HaskellAttributeInfoList x -> HaskellAttributeInfoList
to :: forall x.
Rep HaskellAttributeInfoList x -> HaskellAttributeInfoList
Generic)
instance GStorable HaskellAttributeInfoList
data HaskellAttributeDataList = HaskellAttributeDataList
{ HaskellAttributeDataList -> Word32
attributeDataListLength :: Word32,
HaskellAttributeDataList -> Ptr HaskellAttributeData
attributeDataListSequence :: Ptr HaskellAttributeData
}
deriving (Int -> HaskellAttributeDataList -> String -> String
[HaskellAttributeDataList] -> String -> String
HaskellAttributeDataList -> String
(Int -> HaskellAttributeDataList -> String -> String)
-> (HaskellAttributeDataList -> String)
-> ([HaskellAttributeDataList] -> String -> String)
-> Show HaskellAttributeDataList
forall a.
(Int -> a -> String -> String)
-> (a -> String) -> ([a] -> String -> String) -> Show a
$cshowsPrec :: Int -> HaskellAttributeDataList -> String -> String
showsPrec :: Int -> HaskellAttributeDataList -> String -> String
$cshow :: HaskellAttributeDataList -> String
show :: HaskellAttributeDataList -> String
$cshowList :: [HaskellAttributeDataList] -> String -> String
showList :: [HaskellAttributeDataList] -> String -> String
Show, (forall x.
HaskellAttributeDataList -> Rep HaskellAttributeDataList x)
-> (forall x.
Rep HaskellAttributeDataList x -> HaskellAttributeDataList)
-> Generic HaskellAttributeDataList
forall x.
Rep HaskellAttributeDataList x -> HaskellAttributeDataList
forall x.
HaskellAttributeDataList -> Rep HaskellAttributeDataList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
HaskellAttributeDataList -> Rep HaskellAttributeDataList x
from :: forall x.
HaskellAttributeDataList -> Rep HaskellAttributeDataList x
$cto :: forall x.
Rep HaskellAttributeDataList x -> HaskellAttributeDataList
to :: forall x.
Rep HaskellAttributeDataList x -> HaskellAttributeDataList
Generic)
instance GStorable HaskellAttributeDataList
type DeviceProxyPtr = Ptr ()
type DatabaseProxyPtr = Ptr ()
type TangoError = Ptr HaskellErrorStack
foreign import capi "c_tango.h tango_create_device_proxy"
tango_create_device_proxy :: CString -> Ptr DeviceProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_delete_device_proxy"
tango_delete_device_proxy :: DeviceProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_read_attribute"
tango_read_attribute :: DeviceProxyPtr -> CString -> Ptr HaskellAttributeData -> IO TangoError
foreign import capi "c_tango.h tango_write_attribute"
tango_write_attribute :: DeviceProxyPtr -> Ptr HaskellAttributeData -> IO TangoError
foreign import capi "c_tango.h tango_command_inout"
tango_command_inout :: DeviceProxyPtr -> CString -> Ptr HaskellCommandData -> Ptr HaskellCommandData -> IO TangoError
foreign import capi "c_tango.h tango_free_AttributeData"
tango_free_AttributeData :: Ptr HaskellAttributeData -> IO ()
foreign import capi "c_tango.h tango_free_AttributeInfoList"
tango_free_AttributeInfoList :: Ptr HaskellAttributeInfoList -> IO ()
foreign import capi "c_tango.h tango_free_CommandData"
tango_free_CommandData :: Ptr HaskellCommandData -> IO ()
foreign import capi "c_tango.h tango_free_VarStringArray"
tango_free_VarStringArray :: Ptr (HaskellTangoVarArray CString) -> IO ()
foreign import capi "c_tango.h tango_set_timeout_millis"
tango_set_timeout_millis :: DeviceProxyPtr -> CInt -> IO TangoError
foreign import capi "c_tango.h tango_get_timeout_millis"
tango_get_timeout_millis :: DeviceProxyPtr -> Ptr CInt -> IO TangoError
foreign import capi "c_tango.h tango_set_source"
tango_set_source :: DeviceProxyPtr -> CInt -> IO TangoError
foreign import capi "c_tango.h tango_lock"
tango_lock :: DeviceProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_unlock"
tango_unlock :: DeviceProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_locking_status"
tango_locking_status :: DeviceProxyPtr -> Ptr CString -> IO TangoError
foreign import capi "c_tango.h tango_command_list_query"
tango_command_list_query :: DeviceProxyPtr -> Ptr HaskellCommandInfoList -> IO TangoError
foreign import capi "c_tango.h tango_command_query"
tango_command_query :: DeviceProxyPtr -> CString -> Ptr HaskellCommandInfo -> IO TangoError
foreign import capi "c_tango.h tango_free_CommandInfo"
tango_free_CommandInfo :: Ptr HaskellCommandInfo -> IO ()
foreign import capi "c_tango.h tango_free_CommandInfoList"
tango_free_CommandInfoList :: Ptr HaskellCommandInfoList -> IO ()
foreign import capi "c_tango.h tango_get_attribute_list"
tango_get_attribute_list :: DeviceProxyPtr -> Ptr (HaskellTangoVarArray CString) -> IO TangoError
foreign import capi "c_tango.h tango_get_attribute_config"
tango_get_attribute_config :: DeviceProxyPtr -> Ptr (HaskellTangoVarArray CString) -> Ptr HaskellAttributeInfoList -> IO TangoError
foreign import capi "c_tango.h tango_read_attributes"
tango_read_attributes :: DeviceProxyPtr -> Ptr (HaskellTangoVarArray CString) -> Ptr HaskellAttributeDataList -> IO TangoError
foreign import capi "c_tango.h tango_write_attributes"
tango_write_attributes :: DeviceProxyPtr -> Ptr HaskellAttributeDataList -> IO TangoError
foreign import capi "c_tango.h tango_create_database_proxy"
tango_create_database_proxy :: Ptr DatabaseProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_delete_database_proxy"
tango_delete_database_proxy :: DatabaseProxyPtr -> IO TangoError
foreign import capi "c_tango.h tango_get_device_exported"
tango_get_device_exported :: DatabaseProxyPtr -> CString -> Ptr HaskellDbDatum -> IO TangoError
foreign import capi "c_tango.h tango_get_device_exported_for_class"
tango_get_device_exported_for_class :: DatabaseProxyPtr -> CString -> Ptr HaskellDbDatum -> IO TangoError
foreign import capi "c_tango.h tango_get_object_list"
tango_get_object_list :: DatabaseProxyPtr -> CString -> Ptr HaskellDbDatum -> IO TangoError
foreign import capi "c_tango.h tango_get_object_property_list"
tango_get_object_property_list :: DatabaseProxyPtr -> CString -> CString -> Ptr HaskellDbDatum -> IO TangoError
foreign import capi "c_tango.h tango_get_property"
tango_get_property :: DatabaseProxyPtr -> CString -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_put_property"
tango_put_property :: DatabaseProxyPtr -> CString -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_delete_property"
tango_delete_property :: DatabaseProxyPtr -> CString -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_get_device_property"
tango_get_device_property :: DeviceProxyPtr -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_put_device_property"
tango_put_device_property :: DeviceProxyPtr -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_delete_device_property"
tango_delete_device_property :: DeviceProxyPtr -> Ptr HaskellDbData -> IO TangoError
foreign import capi "c_tango.h tango_free_DbDatum"
tango_free_DbDatum :: Ptr HaskellDbDatum -> IO ()
foreign import capi "c_tango.h tango_free_DbData"
tango_free_DbData :: Ptr HaskellDbData -> IO ()
type EventCallback = Ptr () -> CString -> Bool -> IO ()
foreign import ccall "wrapper" createEventCallbackWrapper :: EventCallback -> IO (FunPtr EventCallback)
foreign import capi "c_tango.h tango_create_event_callback"
tango_create_event_callback :: FunPtr EventCallback -> IO (Ptr ())
foreign import capi "c_tango.h tango_free_event_callback"
tango_free_event_callback :: Ptr () -> IO ()
foreign import capi "c_tango.h tango_subscribe_event"
tango_subscribe_event :: DeviceProxyPtr -> CString -> CInt -> Ptr () -> CBool -> IO CInt
foreign import capi "c_tango.h tango_unsubscribe_event"
tango_unsubscribe_event :: DeviceProxyPtr -> CInt -> IO ()
foreign import capi "c_tango.h tango_poll_command"
tango_poll_command :: DeviceProxyPtr -> CString -> CInt -> IO TangoError
foreign import capi "c_tango.h tango_stop_poll_command"
tango_stop_poll_command :: DeviceProxyPtr -> CString -> IO TangoError
foreign import capi "c_tango.h tango_poll_attribute"
tango_poll_attribute :: DeviceProxyPtr -> CString -> CInt -> IO TangoError
foreign import capi "c_tango.h tango_stop_poll_attribute"
tango_stop_poll_attribute :: DeviceProxyPtr -> CString -> IO TangoError