mercury-api-0.1.0.2: Haskell binding to Mercury API for ThingMagic RFID readers

Copyright© Patrick Pelletier 2017
LicenseMIT
Maintainercode@funwithsoftware.org
PortabilityPOSIX, Windows
Safe HaskellNone
LanguageHaskell2010

System.Hardware.MercuryApi

Contents

Description

This module is a Haskell binding to the "Mercury API" C API for ThingMagic RFID readers. It is especially geared toward the SparkFun Simultaneous RFID Reader, which uses ThingMagic's M6e Nano module, but it should work with other ThingMagic readers. (Though currently, only support for serial readers is compiled in.) Most of the function and type names are the same as their counterparts in the C API, with the TMR_ prefix dropped. For more in-depth, language-independent documentation of Mercury API, see Mercury API Programmers Guide.

This module is intended to be imported qualified, e. g.

import qualified System.Hardware.MercuryApi as TMR
Synopsis

Reader

create Source #

Arguments

:: Text

a reader URI, such as tmr:///dev/ttyUSB0 on Linux, tmr:///dev/cu.SLAB_USBtoUART on Mac OS X, or tmr:///COM4 on Windows.

-> IO Reader 

Create a new Reader with the specified URI. The reader is not contacted at this point. On Mac OS X, be sure to use the serial device that starts with cu., not the one that starts with tty..

connect :: Reader -> IO () Source #

Establishes the connection to the reader at the URI specified in the create call. The existence of a reader at the address is verified and the reader is brought into a state appropriate for performing RF operations.

read Source #

Arguments

:: Reader

The reader being operated on

-> Word32

The number of milliseconds to search for tags

-> IO [TagReadData] 

Search for tags for a fixed duration. Follows the ReadPlan stored in PARAM_READ_PLAN.

executeTagOp :: Reader -> TagOp -> Maybe TagFilter -> IO ByteString Source #

Directly executes a TagOp command. Operates on the first tag found, with applicable tag filtering. The call returns immediately after finding one tag and operating on it, unless the command timeout expires first. The operation is performed on the antenna specified in the PARAM_TAGOP_ANTENNA parameter. PARAM_TAGOP_PROTOCOL specifies the protocol to be used. Some TagOps return data, while others will just return an empty ByteString.

reboot :: Reader -> IO () Source #

Reboot the reader

destroy :: Reader -> IO () Source #

Closes the connection to the reader and releases any resources that have been consumed by the reader structure. Any further operations performed on the reader will fail with ERROR_ALREADY_DESTROYED. On finalization of the Reader, destroy will be called automatically if it has not already been called.

withReader Source #

Arguments

:: Text

a reader URI, such as tmr:///dev/ttyUSB0 on Linux, tmr:///dev/cu.SLAB_USBtoUART on Mac OS X, or tmr:///COM4 on Windows.

-> (Reader -> IO a)

computation to run with Reader

-> IO a 

Create a new Reader with the specified URI, pass it to the given computation, and destroy it when the computation exits.

Parameters

Although paramGet and paramSet are very flexible, they only check that the parameter type is correct at runtime. You may prefer to use the functions in System.Hardware.MercuryApi.Params, which ensure the correct type at compile time.

paramList :: Reader -> IO [Param] Source #

Get a list of parameters supported by the reader.

paramGet :: ParamValue a => Reader -> Param -> IO a Source #

Gets the value of a reader parameter. Throws MercuryException with a meStatus of ERROR_INVALID_PARAM_TYPE if the parameter value is not of the correct type (sadly, this is only checked at runtime) or ERROR_UNIMPLEMENTED_PARAM if the parameter has not yet been implemented in the Haskell binding. Can also propagate errors from the C API, such as ERROR_UNSUPPORTED.

paramSet :: ParamValue a => Reader -> Param -> a -> IO () Source #

Sets the value of a reader parameter. Throws MercuryException with a meStatus of ERROR_INVALID_PARAM_TYPE if the parameter value is not of the correct type (sadly, this is only checked at runtime) or ERROR_UNIMPLEMENTED_PARAM if the parameter has not yet been implemented in the Haskell binding. Can also propagate errors from the C API, such as ERROR_UNSUPPORTED or ERROR_READONLY.

paramSetBasics Source #

Arguments

:: Reader

The reader being operated on

-> Region

The region

-> Int32

Power in centi-dBm

-> [AntennaPort]

Antenna list

-> IO () 

Convenience function to set some of the most essential parameters. The specified Region is written into PARAM_REGION_ID. The specified power level is written into PARAM_RADIO_READPOWER and PARAM_RADIO_WRITEPOWER. The specified antenna list is written into the rpAntennas field of PARAM_READ_PLAN, and the first antenna in the list is written into PARAM_TAGOP_ANTENNA. For the SparkFun Simultaneous RFID Reader, the antenna list should be sparkFunAntennas, and if powering the reader off USB, the power level should be 500 (5 dBm). (Higher power levels can be used with a separate power supply.)

paramSetReadPlanFilter :: Reader -> Maybe TagFilter -> IO () Source #

Sets the rpFilter field of the PARAM_READ_PLAN parameter, while leaving the rest of the read plan unchanged.

paramSetReadPlanTagop :: Reader -> Maybe TagOp -> IO () Source #

Sets the rpTagop field of the PARAM_READ_PLAN parameter, while leaving the rest of the read plan unchanged.

Listeners

Transport listeners can be used to monitor the raw serial data going to and from the reader, for debugging purposes. A listener that prints the data to a Handle is available from hexListener or opcodeListener.

addTransportListener Source #

Arguments

:: Reader

The reader to operate on.

-> TransportListener

The listener to call.

-> IO TransportListenerId

A unique identifier which can be used to remove the listener later.

Add a listener to the list of functions that will be called for each message sent to or recieved from the reader.

removeTransportListener Source #

Arguments

:: Reader

The reader to operate on.

-> TransportListenerId

The return value of a call to addTransportListener.

-> IO () 

Remove a listener from the list of functions that will be called for each message sent to or recieved from the reader.

GPIO

The M6e Nano has 4 GPIO pins that can be controlled by software, numbered 1-4. On the SparkFun Simultaneous RFID Reader, GPIO 1 is available on the GPIO1 pin, and GPIOs 2, 3, and 4 are available on the LV2, LV3, and LV4 pins. The GPIO1 pin is 5V, but the LV pins are 3.3V only. To configure GPIOs as inputs or outputs, use PARAM_GPIO_INPUTLIST and PARAM_GPIO_OUTPUTLIST.

gpiGet :: Reader -> IO [GpioPin] Source #

Get the state of all GPI pins.

gpoSet :: Reader -> [GpioPin] -> IO () Source #

Set the state of some GPO pins.

Firmware

Firmware for the M6e Nano can be obtained here.

firmwareLoad Source #

Arguments

:: Reader

The reader being operated on

-> ByteString

The binary firmware image to install

-> IO () 

Attempts to install firmware on the reader, then restart and reinitialize.

firmwareLoadFile Source #

Arguments

:: Reader

The reader being operated on

-> FilePath

Name of file containing firmware image

-> IO () 

Like firmwareLoad, but loads firmware from a file. (e. g. NanoFW-1.7.1.2.sim)

Utility functions

Listeners

hexListener :: Handle -> IO TransportListener Source #

Given a Handle, returns a TransportListener which prints transport data to that handle in hex. If the handle is a terminal, prints transmitted data in magenta and received data in cyan.

opcodeListener :: Handle -> IO TransportListener Source #

Identical to hexListener, but also prints the opcode of each packet, and a timestamp. (The timestamp is relative to an arbitrary point in time, so is only useful for computing differences between timestamps.)

Data helpers

packBytesIntoWords :: ByteString -> [Word16] Source #

Convert a ByteString into a list of Word16, in big-endian order. Padded with 0 if the number of bytes is odd.

passwordToWords :: GEN2_Password -> [Word16] Source #

Split a password into two 16-bit words, suitable for writing into reserved memory.

mkFilterGen2 Source #

Arguments

:: GEN2_Bank

The bank to filter on

-> Word32

The location (in bits) at which to begin comparing the mask

-> ByteString

The mask value to compare with the specified region of tag memory

-> TagFilter 

Create a TagFilterGen2 with the most common settings

Parameters

paramName :: Param -> Text Source #

Return the string name (e. g. "/reader/read/plan") corresponding to a Param.

paramID :: Text -> Param Source #

Return the Param corresponding to a string name (e. g. "/reader/read/plan"). Returns PARAM_NONE if no such parameter exists.

paramType :: Param -> ParamType Source #

Indicates the type expected for a given parameter.

paramUnits :: Param -> Maybe Text Source #

For parameters which are expressed in physical units, returns a string describing the units. Returns Nothing for parameters which are not expressed in physical units. This can be useful for displaying in a user interface, for example.

Hex conversion

bytesToHex :: ByteString -> Text Source #

Convert a ByteString, such as a tag EPC, into a hexadecimal string.

bytesToHexWithSpaces :: ByteString -> Text Source #

Like bytesToHex, but with a space between each byte.

hexToBytes :: Text -> Maybe ByteString Source #

Convert a hexadecimal string (without spaces) into a ByteString. The hex string may optionally include a "0x" prefix, which will be ignored. If the input cannot be parsed as a hex string, returns Nothing.

Display

Some functions to format data in a more human-friendly format than show.

displayTimestamp Source #

Arguments

:: MillisecondsSinceEpoch

milliseconds since 1/1/1970 UTC

-> Text 

Convert a timestamp into ISO 8601 format in UTC.

displayLocalTimestamp Source #

Arguments

:: MillisecondsSinceEpoch

milliseconds since 1/1/1970 UTC

-> IO Text 

Convert a timestamp into ISO 8601 format in the local timezone.

displayData :: ByteString -> [Text] Source #

Format a ByteString as 16 bytes per line, with both hex and ascii on the line.

displayGpio :: [GpioPin] -> [Text] Source #

Convert a list of GpioPin to a human-readable list of lines.

displayTagData :: TagData -> [Text] Source #

Convert a TagData to a human-readable list of lines.

displayTagReadData :: TagReadData -> [Text] Source #

Convert a TagReadData to a human-readable list of lines.

displayParamType :: ParamType -> Text Source #

A textual representation of the Haskell type corresponding to a particular ParamType.

displayRegion :: Region -> Text Source #

Like show for Region, but in lower case and without the REGION_ prefix.

displayRegionDescription :: Region -> Text Source #

A description of the given region, useful for a user interface.

parseRegion :: Text -> Maybe Region Source #

Like readMaybe for Region, but case-insenstive and without the REGION_ prefix.

Constants

apiVersion :: Text Source #

Version number of the Mercury API C library.

sparkFunAntennas :: [AntennaPort] Source #

The constant [1], which is the correct value for rpAntennas when using the SparkFun Simultaneous RFID Reader.

defaultReadPlan :: ReadPlan Source #

The read plan that the reader starts out with by default. This has reasonable settings for most things, except for the antennas, which need to be set. (e. g. set rpAntennas to sparkFunAntennas)

killPasswordAddress :: Word32 Source #

Word address of kill password in reserved memory.

accessPasswordAddress :: Word32 Source #

Word address of access password in reserved memory.

Types

Opaque types

data Reader Source #

An opaque type which represents a connection to an RFID reader. Note that Reader is not threadsafe, so if you want to use a Reader from more than one thread, you will need to implement your own locking.

class ParamValue a Source #

A class for types which can be used as parameter values.

Minimal complete definition

pType, pGet, pSet

Instances
ParamValue Bool Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Bool -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Bool

pSet :: Bool -> (Ptr () -> IO ()) -> IO ()

ParamValue Int8 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Int8 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Int8

pSet :: Int8 -> (Ptr () -> IO ()) -> IO ()

ParamValue Int16 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Int16 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Int16

pSet :: Int16 -> (Ptr () -> IO ()) -> IO ()

ParamValue Int32 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Int32 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Int32

pSet :: Int32 -> (Ptr () -> IO ()) -> IO ()

ParamValue Word8 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Word8 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Word8

pSet :: Word8 -> (Ptr () -> IO ()) -> IO ()

ParamValue Word16 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Word16 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Word16

pSet :: Word16 -> (Ptr () -> IO ()) -> IO ()

ParamValue Word32 Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Word32 -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Word32

pSet :: Word32 -> (Ptr () -> IO ()) -> IO ()

ParamValue Text Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Text -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Text

pSet :: Text -> (Ptr () -> IO ()) -> IO ()

ParamValue PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: PowerMode -> ParamType

pGet :: (Ptr () -> IO ()) -> IO PowerMode

pSet :: PowerMode -> (Ptr () -> IO ()) -> IO ()

ParamValue GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: GEN2_WriteMode -> ParamType

pGet :: (Ptr () -> IO ()) -> IO GEN2_WriteMode

pSet :: GEN2_WriteMode -> (Ptr () -> IO ()) -> IO ()

ParamValue TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: TagProtocol -> ParamType

pGet :: (Ptr () -> IO ()) -> IO TagProtocol

pSet :: TagProtocol -> (Ptr () -> IO ()) -> IO ()

ParamValue Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Region -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Region

pSet :: Region -> (Ptr () -> IO ()) -> IO ()

ParamValue ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: ReadPlan -> ParamType

pGet :: (Ptr () -> IO ()) -> IO ReadPlan

pSet :: ReadPlan -> (Ptr () -> IO ()) -> IO ()

ParamValue [Word8] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [Word8] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [Word8]

pSet :: [Word8] -> (Ptr () -> IO ()) -> IO ()

ParamValue [Word32] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [Word32] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [Word32]

pSet :: [Word32] -> (Ptr () -> IO ()) -> IO ()

ParamValue [MetadataFlag] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [MetadataFlag] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [MetadataFlag]

pSet :: [MetadataFlag] -> (Ptr () -> IO ()) -> IO ()

ParamValue [TagProtocol] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [TagProtocol] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [TagProtocol]

pSet :: [TagProtocol] -> (Ptr () -> IO ()) -> IO ()

ParamValue [Region] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [Region] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [Region]

pSet :: [Region] -> (Ptr () -> IO ()) -> IO ()

data TransportListenerId Source #

An opaque type which can be passed to removeTransportListener to remove a transport listener.

Typedefs

type TransportListener Source #

Arguments

 = TransportDirection

Direction of data transmission

-> ByteString

Binary data sent or received

-> Word32

Timeout

-> IO () 

A function which can be installed via addTransportListener to be called every time Mercury API sends or receives data on the serial port.

type PinNumber = Word8 Source #

A GPIO pin number. On the M6e Nano, these are numbered 1-4.

type AntennaPort = Word8 Source #

An antenna number. On the SparkFun Simultaneous RFID Reader, there is a single antenna with the number 1.

type GEN2_Password = Word32 Source #

A 32-bit password (access or kill) in the Gen2 protocol.

type MillisecondsSinceEpoch = Word64 Source #

milliseconds since 1/1/1970 UTC

Records

data MercuryException Source #

Represents any error that can occur in a MercuryApi call, except for those which can be represented by IOException.

Constructors

MercuryException 

Fields

data ReadPlan Source #

A ReadPlan record specifies the antennas, protocols, and filters to use for a search (read).

Currently, only SimpleReadPlan is supported.

Constructors

SimpleReadPlan 

Fields

Instances
Eq ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Ord ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Read ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Show ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Storable ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

ParamValue ReadPlan Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: ReadPlan -> ParamType

pGet :: (Ptr () -> IO ()) -> IO ReadPlan

pSet :: ReadPlan -> (Ptr () -> IO ()) -> IO ()

data TagOp Source #

An operation that can be performed on a tag. Can be used as an argument to executeTagOp, or can be embedded into a ReadPlan. (However, on the M6e Nano, only TagOp_GEN2_ReadData may be embedded in a ReadPlan.)

Constructors

TagOp_GEN2_ReadData 

Fields

TagOp_GEN2_WriteTag 

Fields

TagOp_GEN2_WriteData 

Fields

TagOp_GEN2_Lock 

Fields

TagOp_GEN2_Kill 

Fields

TagOp_GEN2_BlockWrite 

Fields

TagOp_GEN2_BlockErase 

Fields

TagOp_GEN2_BlockPermaLock 

Fields

Instances
Eq TagOp Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Methods

(==) :: TagOp -> TagOp -> Bool #

(/=) :: TagOp -> TagOp -> Bool #

Ord TagOp Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Methods

compare :: TagOp -> TagOp -> Ordering #

(<) :: TagOp -> TagOp -> Bool #

(<=) :: TagOp -> TagOp -> Bool #

(>) :: TagOp -> TagOp -> Bool #

(>=) :: TagOp -> TagOp -> Bool #

max :: TagOp -> TagOp -> TagOp #

min :: TagOp -> TagOp -> TagOp #

Read TagOp Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Show TagOp Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Methods

showsPrec :: Int -> TagOp -> ShowS #

show :: TagOp -> String #

showList :: [TagOp] -> ShowS #

Storable TagOp Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Methods

sizeOf :: TagOp -> Int #

alignment :: TagOp -> Int #

peekElemOff :: Ptr TagOp -> Int -> IO TagOp #

pokeElemOff :: Ptr TagOp -> Int -> TagOp -> IO () #

peekByteOff :: Ptr b -> Int -> IO TagOp #

pokeByteOff :: Ptr b -> Int -> TagOp -> IO () #

peek :: Ptr TagOp -> IO TagOp #

poke :: Ptr TagOp -> TagOp -> IO () #

data TagFilter Source #

Filter on EPC data, or on Gen2-specific information.

Constructors

TagFilterEPC TagData 
TagFilterGen2 

Fields

data FilterOn Source #

Filter on EPC length, or on a Gen2 bank.

data TagReadData Source #

A record to represent a read of an RFID tag. Provides access to the metadata of the read event, such as the time of the read, the antenna that read the tag, and the number of times the tag was seen by the air protocol.

Constructors

TagReadData 

Fields

Instances
Eq TagReadData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Ord TagReadData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Read TagReadData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Show TagReadData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Storable TagReadData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

data GpioPin Source #

The identity and state of a single GPIO pin.

Constructors

GpioPin 

Fields

data TagData Source #

A record to represent RFID tags.

Constructors

TagData 

Fields

newtype GEN2_TagData Source #

Gen2-specific per-tag data

Constructors

GEN2_TagData 

Fields

Instances
Eq GEN2_TagData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Ord GEN2_TagData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Read GEN2_TagData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Show GEN2_TagData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

Storable GEN2_TagData Source # 
Instance details

Defined in System.Hardware.MercuryApi.Records

data ReadWrite Source #

Indicates whether to read or write the lock bits in TagOp_GEN2_BlockPermaLock.

Constructors

Read !Int

number of words of lock bits to read

Write ![Word16]

lock bits to write

Enums

data StatusType Source #

Indicates a general category of error.

Constructors

SUCCESS_TYPE 
ERROR_TYPE_COMM 
ERROR_TYPE_CODE 
ERROR_TYPE_MISC 
ERROR_TYPE_LLRP 
ERROR_TYPE_BINDING

An error which originates from the Haskell binding, not the underlying C library.

ERROR_TYPE_UNKNOWN

Not a recognized status type

Instances
Bounded StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show StatusType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

data Status Source #

A specific error encountered by the C API or the Haskell binding.

Constructors

SUCCESS

Success! (Never thrown in an exception)

ERROR_MSG_WRONG_NUMBER_OF_DATA

Invalid number of arguments

ERROR_INVALID_OPCODE

Command opcode not recognized.

ERROR_UNIMPLEMENTED_OPCODE

Command opcode recognized, but is not supported.

ERROR_MSG_POWER_TOO_HIGH

Requested power setting is above the allowed maximum.

ERROR_MSG_INVALID_FREQ_RECEIVED

Requested frequency is outside the allowed range.

ERROR_MSG_INVALID_PARAMETER_VALUE

Parameter value is outside the allowed range.

ERROR_MSG_POWER_TOO_LOW

Requested power setting is below the allowed minimum.

ERROR_UNIMPLEMENTED_FEATURE

Command not supported.

ERROR_INVALID_BAUD_RATE

Requested serial speed is not supported.

ERROR_INVALID_REGION

Region is not supported.

ERROR_INVALID_LICENSE_KEY

License key code is invalid

ERROR_BL_INVALID_IMAGE_CRC

Firmware is corrupt: Checksum doesn't match content.

ERROR_BL_INVALID_APP_END_ADDR

Serial protocol status code for this exception.

ERROR_FLASH_BAD_ERASE_PASSWORD

Internal reader error. Contact support.

ERROR_FLASH_BAD_WRITE_PASSWORD

Internal reader error. Contact support.

ERROR_FLASH_UNDEFINED_SECTOR

Internal reader error. Contact support.

ERROR_FLASH_ILLEGAL_SECTOR

Internal reader error. Contact support.

ERROR_FLASH_WRITE_TO_NON_ERASED_AREA

Internal reader error. Contact support.

ERROR_FLASH_WRITE_TO_ILLEGAL_SECTOR

Internal reader error. Contact support.

ERROR_FLASH_VERIFY_FAILED

Internal reader error. Contact support.

ERROR_NO_TAGS_FOUND

Reader was asked to find tags, but none were detected.

ERROR_NO_PROTOCOL_DEFINED

RFID protocol has not been configured.

ERROR_INVALID_PROTOCOL_SPECIFIED

Requested RFID protocol is not recognized.

ERROR_WRITE_PASSED_LOCK_FAILED

Lock failed after write operation

ERROR_PROTOCOL_NO_DATA_READ

Tag data was requested, but could not be read.

ERROR_AFE_NOT_ON

AFE not on - reader not sufficiently configured

ERROR_PROTOCOL_WRITE_FAILED

Write to tag failed.

ERROR_NOT_IMPLEMENTED_FOR_THIS_PROTOCOL

Command is not supported in the current RFID protocol.

ERROR_PROTOCOL_INVALID_WRITE_DATA

Data does not conform to protocol standards.

ERROR_PROTOCOL_INVALID_ADDRESS

Requested data address is outside the valid range.

ERROR_GENERAL_TAG_ERROR

Unknown error during RFID operation.

ERROR_DATA_TOO_LARGE

Read Tag Data was asked for more data than it supports.

ERROR_PROTOCOL_INVALID_KILL_PASSWORD

Incorrect password was provided to Kill Tag.

ERROR_PROTOCOL_KILL_FAILED

Kill failed for unknown reason.

ERROR_PROTOCOL_BIT_DECODING_FAILED

Internal reader error. Contact support.

ERROR_PROTOCOL_INVALID_EPC

Internal reader error. Contact support.

ERROR_PROTOCOL_INVALID_NUM_DATA

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_OTHER_ERROR

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_MEMORY_OVERRUN_BAD_PC

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_MEMORY_LOCKED

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_V2_AUTHEN_FAILED

Authentication failed with specified key.

ERROR_GEN2_PROTOCOL_V2_UNTRACE_FAILED

Untrace operation failed.

ERROR_GEN2_PROTOCOL_INSUFFICIENT_POWER

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_NON_SPECIFIC_ERROR

Internal reader error. Contact support.

ERROR_GEN2_PROTOCOL_UNKNOWN_ERROR

Internal reader error. Contact support.

ERROR_AHAL_INVALID_FREQ

A command was received to set a frequency outside the specified range.

ERROR_AHAL_CHANNEL_OCCUPIED

With LBT enabled an attempt was made to set the frequency to an occupied channel.

ERROR_AHAL_TRANSMITTER_ON

Checking antenna status while CW is on is not allowed.

ERROR_ANTENNA_NOT_CONNECTED

Antenna not detected during pre-transmit safety test.

ERROR_TEMPERATURE_EXCEED_LIMITS

Reader temperature outside safe range.

ERROR_HIGH_RETURN_LOSS

Excess power detected at transmitter port, usually due to antenna tuning mismatch.

ERROR_INVALID_ANTENNA_CONFIG

Invalid antenna configuration

ERROR_TAG_ID_BUFFER_NOT_ENOUGH_TAGS_AVAILABLE

Asked for more tags than were available in the buffer.

ERROR_TAG_ID_BUFFER_FULL

Too many tags are in buffer. Remove some with Get Tag ID Buffer or Clear Tag ID Buffer.

ERROR_TAG_ID_BUFFER_REPEATED_TAG_ID

Internal error -- reader is trying to insert a duplicate tag record. Contact support.

ERROR_TAG_ID_BUFFER_NUM_TAG_TOO_LARGE

Asked for tags than a single transaction can handle.

ERROR_TAG_ID_BUFFER_AUTH_REQUEST

Blocked response to get additional data from host.

ERROR_SYSTEM_UNKNOWN_ERROR

Internal reader error. Contact support.

ERROR_TM_ASSERT_FAILED

Internal reader error. Contact support.

ERROR_TIMEOUT

Timeout

ERROR_NO_HOST

No matching host found

ERROR_LLRP

LLRP error

ERROR_PARSE

Error parsing device response

ERROR_DEVICE_RESET

Device was reset externally

ERROR_CRC_ERROR

CRC Error

ERROR_INVALID

Invalid argument

ERROR_UNIMPLEMENTED

Unimplemented operation

ERROR_UNSUPPORTED

Unsupported operation

ERROR_NO_ANTENNA

No antenna or invalid antenna

ERROR_READONLY

Value is read-only

ERROR_TOO_BIG

Value too big

ERROR_NO_THREADS

Thread initialization failed

ERROR_NO_TAGS

No tags to be retrieved

ERROR_NOT_FOUND

Key not found

ERROR_FIRMWARE_FORMAT

Size or format of firmware image is incorrect

ERROR_TRYAGAIN

Temporary error, try again

ERROR_OUT_OF_MEMORY

Out of memory

ERROR_INVALID_WRITE_MODE

Invalid write mode

ERROR_ILLEGAL_VALUE

Illegal value

ERROR_END_OF_READING 
ERROR_UNSUPPORTED_READER_TYPE

Unsupported reader type

ERROR_BUFFER_OVERFLOW

Buffer overflow

ERROR_LOADSAVE_CONFIG 
ERROR_AUTOREAD_ENABLED

Autonomous mode is enabled on reader. Please disable it

ERROR_FIRMWARE_UPDATE_ON_AUTOREAD

Firmware update is successful. Autonomous mode is already enabled on reader

ERROR_TIMESTAMP_NULL

Timestamp cannot be null

ERROR_LLRP_GETTYPEREGISTRY

LLRP Reader GetTypeRegistry Failed

ERROR_LLRP_CONNECTIONFAILED

LLRP Reader Connection attempt is failed

ERROR_LLRP_SENDIO_ERROR

LLRP Reader Send Messages failed

ERROR_LLRP_RECEIVEIO_ERROR

LLRP Reader Receive Messages failed

ERROR_LLRP_RECEIVE_TIMEOUT

LLRP Reader Receive Messages Timeout

ERROR_LLRP_MSG_PARSE_ERROR

Error parsing LLRP message

ERROR_LLRP_ALREADY_CONNECTED

Already connected to reader

ERROR_LLRP_INVALID_RFMODE

Specified RF Mode operation is not supported

ERROR_LLRP_UNDEFINED_VALUE

Undefined Value

ERROR_LLRP_READER_ERROR

LLRP reader unknown error

ERROR_LLRP_READER_CONNECTION_LOST

LLRP reader connection lost

ERROR_LLRP_CLIENT_CONNECTION_EXISTS

LLRP Reader Connection attempt is failed, A Client initiated connection already exists

ERROR_ALREADY_DESTROYED

Attempt to use reader after it was destroyed.

ERROR_INVALID_PARAM_TYPE

The parameter value was not of the type expected.

ERROR_UNIMPLEMENTED_PARAM

The given parameter is not yet implemented in the Haskell binding.

ERROR_UNKNOWN Word32

C API returned an unrecognized status code

data Param Source #

Reader parameters which you can get and set. The names are the same as the names of the enum in the C API. (Unfortunately, these do not correspond to the "path"-style names in any systematic way.) Each parameter is listed with its "path", and the Haskell type which is used to store it. Some parameters are also listed with the physical units the parameter is in. Not all parameters are implemented in the Haskell binding. Please file a Github issue if there is a parameter you need which is not implemented.

Constructors

PARAM_NONE

No such parameter - used as a return value from paramID.

PARAM_BAUDRATE

/reader/baudRate Word32

PARAM_COMMANDTIMEOUT

/reader/commandTimeout Word32 (milliseconds)

PARAM_CURRENTTIME

/reader/currentTime (Not yet implemented)

PARAM_READER_DESCRIPTION

/reader/description Text

PARAM_EXTENDEDEPC

/reader/extendedEpc Bool

PARAM_READER_HOSTNAME

/reader/hostname Text

PARAM_LICENSE_KEY

/reader/licenseKey [Word8]

PARAM_LICENSED_FEATURES

/reader/licensedFeatures [Word8]

PARAM_METADATAFLAG

/reader/metadataflags [MetadataFlag]

PARAM_POWERMODE

/reader/powerMode PowerMode

PARAM_PROBEBAUDRATES

/reader/probeBaudRates [Word32]

PARAM_READER_STATISTICS

/reader/statistics (Not yet implemented)

PARAM_READER_STATS

/reader/stats (Not yet implemented)

PARAM_TRANSPORTTIMEOUT

/reader/transportTimeout Word32 (milliseconds)

PARAM_URI

/reader/uri Text (read-only)

PARAM_USER_CONFIG

/reader/userConfig (Not yet implemented)

PARAM_USERMODE

/reader/userMode (Not yet implemented)

PARAM_ANTENNA_CHECKPORT

/reader/antenna/checkPort Bool

PARAM_ANTENNA_CONNECTEDPORTLIST

/reader/antenna/connectedPortList [Word8], or typedef 'System.Hardware.MercuryApi.AntennaPort'

PARAM_ANTENNA_PORTLIST

/reader/antenna/portList [Word8], or typedef 'System.Hardware.MercuryApi.AntennaPort'

PARAM_ANTENNA_PORTSWITCHGPOS

/reader/antenna/portSwitchGpos [Word8], or typedef [PinNumber]

PARAM_ANTENNA_RETURNLOSS

/reader/antenna/returnLoss (Not yet implemented)

PARAM_ANTENNA_SETTLINGTIMELIST

/reader/antenna/settlingTimeList (Not yet implemented)

PARAM_ANTENNA_TXRXMAP

/reader/antenna/txRxMap (Not yet implemented)

PARAM_GEN2_BLF

/reader/gen2/BLF (Not yet implemented)

PARAM_GEN2_ACCESSPASSWORD

/reader/gen2/accessPassword Word32, or typedef GEN2_Password

PARAM_GEN2_BAP

/reader/gen2/bap (Not yet implemented)

PARAM_GEN2_PROTOCOLEXTENSION

/reader/gen2/protocolExtension (Not yet implemented)

PARAM_GEN2_Q

/reader/gen2/q (Not yet implemented)

PARAM_GEN2_SESSION

/reader/gen2/session (Not yet implemented)

PARAM_GEN2_TAGENCODING

/reader/gen2/tagEncoding (Not yet implemented)

PARAM_GEN2_TARGET

/reader/gen2/target (Not yet implemented)

PARAM_GEN2_TARI

/reader/gen2/tari (Not yet implemented)

PARAM_READER_WRITE_EARLY_EXIT

/reader/gen2/writeEarlyExit Bool

PARAM_GEN2_WRITEMODE

/reader/gen2/writeMode GEN2_WriteMode

PARAM_READER_WRITE_REPLY_TIMEOUT

/reader/gen2/writeReplyTimeout Word16 (microseconds)

PARAM_GPIO_INPUTLIST

/reader/gpio/inputList [Word8], or typedef [PinNumber]

PARAM_GPIO_OUTPUTLIST

/reader/gpio/outputList [Word8], or typedef [PinNumber]

PARAM_ISO180006B_BLF

/reader/iso180006b/BLF (Not yet implemented)

PARAM_ISO180006B_DELIMITER

/reader/iso180006b/delimiter (Not yet implemented)

PARAM_ISO180006B_MODULATION_DEPTH

/reader/iso180006b/modulationDepth (Not yet implemented)

PARAM_RADIO_ENABLEPOWERSAVE

/reader/radio/enablePowerSave Bool

PARAM_RADIO_ENABLESJC

/reader/radio/enableSJC Bool

PARAM_RADIO_PORTREADPOWERLIST

/reader/radio/portReadPowerList (Not yet implemented)

PARAM_RADIO_PORTWRITEPOWERLIST

/reader/radio/portWritePowerList (Not yet implemented)

PARAM_RADIO_POWERMAX

/reader/radio/powerMax Int16 (centi-dBm, read-only)

PARAM_RADIO_POWERMIN

/reader/radio/powerMin Int16 (centi-dBm, read-only)

PARAM_RADIO_READPOWER

/reader/radio/readPower Int32 (centi-dBm)

PARAM_RADIO_TEMPERATURE

/reader/radio/temperature Int8 (degrees C, read-only)

PARAM_RADIO_WRITEPOWER

/reader/radio/writePower Int32 (centi-dBm)

PARAM_READ_ASYNCOFFTIME

/reader/read/asyncOffTime Word32 (milliseconds)

PARAM_READ_ASYNCONTIME

/reader/read/asyncOnTime Word32 (milliseconds)

PARAM_READ_PLAN

/reader/read/plan ReadPlan

PARAM_REGION_HOPTABLE

/reader/region/hopTable 'Word32'

PARAM_REGION_HOPTIME

/reader/region/hopTime Word32 (milliseconds)

PARAM_REGION_ID

/reader/region/id Region

PARAM_REGION_SUPPORTEDREGIONS

/reader/region/supportedRegions 'Region'

PARAM_REGION_LBT_ENABLE

/reader/region/lbt/enable Bool

PARAM_READER_STATS_ENABLE

/reader/stats/enable (Not yet implemented)

PARAM_STATUS_ENABLE_ANTENNAREPORT

/reader/status/antennaEnable Bool

PARAM_STATUS_ENABLE_FREQUENCYREPORT

/reader/status/frequencyEnable Bool

PARAM_STATUS_ENABLE_TEMPERATUREREPORT

/reader/status/temperatureEnable Bool

PARAM_TAGREADDATA_ENABLEREADFILTER

/reader/tagReadData/enableReadFilter Bool

PARAM_TAGREADDATA_READFILTERTIMEOUT

/reader/tagReadData/readFilterTimeout Int32

PARAM_TAGREADDATA_RECORDHIGHESTRSSI

/reader/tagReadData/recordHighestRssi Bool

PARAM_TAGREADDATA_REPORTRSSIINDBM

/reader/tagReadData/reportRssiInDbm Bool

PARAM_TAGREADATA_TAGOPFAILURECOUNT

/reader/tagReadData/tagopFailures Word16 (read-only)

PARAM_TAGREADATA_TAGOPSUCCESSCOUNT

/reader/tagReadData/tagopSuccesses Word16 (read-only)

PARAM_TAGREADDATA_UNIQUEBYANTENNA

/reader/tagReadData/uniqueByAntenna Bool

PARAM_TAGREADDATA_UNIQUEBYDATA

/reader/tagReadData/uniqueByData Bool

PARAM_TAGREADDATA_UNIQUEBYPROTOCOL

/reader/tagReadData/uniqueByProtocol Bool

PARAM_TAGOP_ANTENNA

/reader/tagop/antenna Word8, or typedef AntennaPort

PARAM_TAGOP_PROTOCOL

/reader/tagop/protocol TagProtocol

PARAM_TRIGGER_READ_GPI

/reader/trigger/read/Gpi [Word8], or typedef [PinNumber]

PARAM_VERSION_HARDWARE

/reader/version/hardware Text (read-only)

PARAM_VERSION_MODEL

/reader/version/model Text (read-only)

PARAM_PRODUCT_GROUP

/reader/version/productGroup Text (read-only)

PARAM_PRODUCT_GROUP_ID

/reader/version/productGroupID Word16 (read-only)

PARAM_PRODUCT_ID

/reader/version/productID Word16 (read-only)

PARAM_VERSION_SERIAL

/reader/version/serial Text

PARAM_VERSION_SOFTWARE

/reader/version/software Text (read-only)

PARAM_VERSION_SUPPORTEDPROTOCOLS

/reader/version/supportedProtocols 'TagProtocol'

PARAM_SELECTED_PROTOCOLS 
Instances
Bounded Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Methods

(==) :: Param -> Param -> Bool #

(/=) :: Param -> Param -> Bool #

Ord Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Methods

compare :: Param -> Param -> Ordering #

(<) :: Param -> Param -> Bool #

(<=) :: Param -> Param -> Bool #

(>) :: Param -> Param -> Bool #

(>=) :: Param -> Param -> Bool #

max :: Param -> Param -> Param #

min :: Param -> Param -> Param #

Read Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Methods

showsPrec :: Int -> Param -> ShowS #

show :: Param -> String #

showList :: [Param] -> ShowS #

Hashable Param Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Methods

hashWithSalt :: Int -> Param -> Int #

hash :: Param -> Int #

data ParamType Source #

The Haskell data type expected for a particular parameter.

Instances
Bounded ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show ParamType Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

data Region Source #

RFID regulatory regions

Constructors

REGION_NONE

Unspecified region

REGION_NA

North America

REGION_EU

European Union

REGION_KR

Korea

REGION_IN

India

REGION_JP

Japan

REGION_PRC

People's Republic of China

REGION_EU2

European Union 2

REGION_EU3

European Union 3

REGION_KR2

Korea 2

REGION_PRC2

People's Republic of China(840MHZ)

REGION_AU

Australia

REGION_NZ

New Zealand !!EXPERIMENTAL!!

REGION_NA2

Reduced FCC region

REGION_NA3

5MHZ FCC band

REGION_IS

Israel

REGION_OPEN

Open

Instances
Bounded Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Methods

(==) :: Region -> Region -> Bool #

(/=) :: Region -> Region -> Bool #

Ord Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

ParamValue Region Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: Region -> ParamType

pGet :: (Ptr () -> IO ()) -> IO Region

pSet :: Region -> (Ptr () -> IO ()) -> IO ()

ParamValue [Region] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [Region] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [Region]

pSet :: [Region] -> (Ptr () -> IO ()) -> IO ()

data TagProtocol Source #

The protocol used by an RFID tag. Only TAG_PROTOCOL_GEN2 is supported by the M6e Nano, and therefore the Haskell binding currently only supports that protocol.

Instances
Bounded TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

ParamValue TagProtocol Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: TagProtocol -> ParamType

pGet :: (Ptr () -> IO ()) -> IO TagProtocol

pSet :: TagProtocol -> (Ptr () -> IO ()) -> IO ()

ParamValue [TagProtocol] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [TagProtocol] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [TagProtocol]

pSet :: [TagProtocol] -> (Ptr () -> IO ()) -> IO ()

data MetadataFlag Source #

Various metadata parameters which can be requested in PARAM_METADATAFLAG.

Instances
Bounded MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show MetadataFlag Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

ParamValue [MetadataFlag] Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: [MetadataFlag] -> ParamType

pGet :: (Ptr () -> IO ()) -> IO [MetadataFlag]

pSet :: [MetadataFlag] -> (Ptr () -> IO ()) -> IO ()

data GEN2_Bank Source #

Gen2 memory banks

Constructors

GEN2_BANK_RESERVED

Reserved bank (kill and access passwords)

GEN2_BANK_EPC

EPC memory bank

GEN2_BANK_TID

TID memory bank

GEN2_BANK_USER

User memory bank

Instances
Bounded GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show GEN2_Bank Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

data GEN2_LockBits Source #

Memory lock bits

Constructors

GEN2_LOCK_BITS_USER_PERM

User memory bank lock permalock bit

GEN2_LOCK_BITS_USER

User memory bank lock bit

GEN2_LOCK_BITS_TID_PERM

TID memory bank lock permalock bit

GEN2_LOCK_BITS_TID

TID memory bank lock bit

GEN2_LOCK_BITS_EPC_PERM

EPC memory bank lock permalock bit

GEN2_LOCK_BITS_EPC

EPC memory bank lock bit

GEN2_LOCK_BITS_ACCESS_PERM

Access password lock permalock bit

GEN2_LOCK_BITS_ACCESS

Access password lock bit

GEN2_LOCK_BITS_KILL_PERM

Kill password lock permalock bit

GEN2_LOCK_BITS_KILL

Kill password lock bit

Instances
Bounded GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show GEN2_LockBits Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

data GEN2_WriteMode Source #

Whether to use word write or block write for TagOp_GEN2_WriteData.

Instances
Bounded GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

ParamValue GEN2_WriteMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: GEN2_WriteMode -> ParamType

pGet :: (Ptr () -> IO ()) -> IO GEN2_WriteMode

pSet :: GEN2_WriteMode -> (Ptr () -> IO ()) -> IO ()

data PowerMode Source #

Value for parameter PARAM_POWERMODE. On the M6e Nano, POWER_MODE_MINSAVE, POWER_MODE_MEDSAVE, and POWER_MODE_MAXSAVE are all the same.

Instances
Bounded PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Enum PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Eq PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Ord PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Read PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

Show PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.Enums

ParamValue PowerMode Source # 
Instance details

Defined in System.Hardware.MercuryApi.ParamValue

Methods

pType :: PowerMode -> ParamType

pGet :: (Ptr () -> IO ()) -> IO PowerMode

pSet :: PowerMode -> (Ptr () -> IO ()) -> IO ()

data TransportDirection Source #

The direction of data travel. Passed to TransportListener.

Constructors

Rx

Receive

Tx

Transmit

Instances
Bounded TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi

Enum TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi

Eq TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi

Ord TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi

Read TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi

Show TransportDirection Source # 
Instance details

Defined in System.Hardware.MercuryApi