Difference: DTCLibrary (4 vs. 5)

Revision 507 Jul 2010 - MichaelDimitriyev

Line: 1 to 1
 
META TOPICPARENT name="DTCSoftware"
The DTC library, dtcreg, contains a set of functions that facilitate reading from and writing to registers on the DTC.
Line: 45 to 45
 

Reading and Writing

Changed:
<
<
There are 12 read/write functions. However, all of the functions come in two variations, so in truth, there are only 6 distinct functions.
>
>
There are 16 read/write functions. However, all of the functions come in two variations, so in truth, there are only 8 distinct functions.
 All of the functions ask for the handle as the first parameter and all return an error code. The second parameter is always a register address. However, there are two ways to enter the address: as an integer or as a string. The integer form is more useful if the functions are in, say, a "for" loop which runs through a number of registers. The string form is useful as register addresses are typically hexadecimal and look something like "0x2c". Therefore, each of the 6 distinct functions has an integer version
Line: 64 to 64
  This is a simple function: the third parameter is the 8-bit value to write to the register.
Changed:
<
<
dtc_read8/dtc_read32
>
>
dtc_read8/dtc_read32/dtc_read16
  Specialized for reading from 8-bit registers and 32-bit registers (four subsequent 8-bit registers). Can also read from a number of subsequent registers.
Line: 76 to 76
  Here, count refers to the number of 32-bit registers to read from, that is, 4*count will be the total number of 8-bit registers to be read.
Added:
>
>
dtc_read16 is similar to the above descriptions.
 
Changed:
<
<
dtc_write8/dtc_write32
>
>
dtc_write8/dtc_write32/dtc_write16
  Similar to dtc_read8/dtc_read32.
Line: 90 to 92
  dat[0] is written to registers regAddr through regAddr+3, dat[1] is written to regAddr+4 through regAddr+7, ..., dat[count-1] is written to regAddr+4*(count-1) through regAddr+4*(count-1)+3.
Added:
>
>
dtc_write16 is similar to the above descriptions
 

Compiling

dtcreg is built on ipmitool and is a wrapper for some of its structures and functions; so while using it does not require knowledge of the ipmitool code, programs built with it must include several additional libraries which are required by ipmitool. There is a makefile included in the dtcreg directory. A description of the header files and libraries and where they are located is at ipmitool.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback