monky-2.0.0.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
Portabilitylinux
Safe HaskellNone
LanguageHaskell2010

Monky.Examples.Combine

Description

The functions in this module can be used to avoid printing seperators between modules.

Nearly equivalend example (image is missing):

pollPack 1 $ getCPUHandle' ScalingCur
pollPack 1 $ (getFreqHandle ScalingCur) combine getRawCPU combine getTempHandle'

The main function exported by this module are: * combine * combineD * combineE * combineF

They are mainly overloads of the same concept, for combinations of EvtModule and PollModule

The mixed functions (combineD and combineF) create a PollModule. The EvtModule will update a cache in the new module and output will be updated when the PollModule is asked to do so.

NOTE: because of this, the event will be handled when it is detected, but the output will not update until the PollModule wrapper ticks once.

Synopsis

Documentation

data (PollModule a, PollModule b) => CombiHandle a b #

Wrapper type for PollModules

Instances

combine :: (PollModule a, PollModule b) => IO a -> IO b -> IO (CombiHandle a b) #

Combine two PollModules. The first arguments output will be printed first

data (EvtModule a, EvtModule b) => EvtCombi a b #

Wrapper type for EvtModules

Instances

(EvtModule a, EvtModule b) => EvtModule (EvtCombi a b) # 

Methods

startEvtLoop :: EvtCombi a b -> ([MonkyOut] -> IO ()) -> IO () #

combineE :: (EvtModule a, EvtModule b) => IO a -> IO b -> IO (EvtCombi a b) #

Combine two EvtModules. The first argument will be printed first.

data (EvtModule a, PollModule b) => EPCombi a b #

Wrapper type for mixed combination.

Instances

(EvtModule a, PollModule b) => PollModule (EPCombi a b) # 

Methods

getOutput :: EPCombi a b -> IO [MonkyOut] #

initialize :: EPCombi a b -> IO () #

combineF :: (EvtModule a, PollModule b) => IO a -> IO b -> IO (EPCombi a b) #

Combine a EvtModule with a PollModule. This will alwasy create a PollModule. |Event updates will not be displayed until the poll modules ticks once.

data (PollModule a, EvtModule b) => PECombi a b #

Wrapper type for mixed combination.

Instances

(PollModule a, EvtModule b) => PollModule (PECombi a b) # 

Methods

getOutput :: PECombi a b -> IO [MonkyOut] #

initialize :: PECombi a b -> IO () #

combineD :: (PollModule a, EvtModule b) => IO a -> IO b -> IO (PECombi a b) #

Look at combineF for documentation