1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/include/usr/hwpf/fapi/fapiAttributeTank.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
/* COPYRIGHT International Business Machines Corp. 2012 */
/* */
/* p1 */
/* */
/* Object Code Only (OCO) source materials */
/* Licensed Internal Code Source Materials */
/* IBM HostBoot Licensed Internal Code */
/* */
/* The source code for this program is not published or otherwise */
/* divested of its trade secrets, irrespective of what has been */
/* deposited with the U.S. Copyright Office. */
/* */
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
/**
* @file fapiAttributeTank.H
*
* @brief Defines the AttributeTank and Attribute classes. A platform can
* choose to use these classes to store attributes for Attribute
* Overriding and Synchronization
*/
/*
* Change Log ******************************************************************
* Flag Defect/Feature User Date Description
* ------ -------------- ---------- ----------- ----------------------------
* mjjones 06/07/2012 Created
* mjjones 10/15/2012 Moved to general AttributeTank.
*/
#ifndef FAPIATTRTANK_H_
#define FAPIATTRTANK_H_
#include <stdint.h>
#include <list>
#include <vector>
#include <fapiAttributeIds.H>
namespace fapi
{
class Target; // Forward Reference
/**
* @enum AttributeFlags
*
* Enumeration of the possible attribute flags. This is a bitmap
*/
enum AttributeFlags
{
ATTR_FLAG_CONST = 1, // Not cleared by clearNonConstAttribute
// Use-case is a constant Attribute Override
};
// Constants for various fields in Attribute
const uint16_t ATTR_POS_NA = 0xffff; // iv_pos not applicable
const uint8_t ATTR_UNIT_POS_NA = 0xff; // iv_unitPos not applicable
const uint8_t ATTR_ARRAYD_NA = 0xff; // iv_arrayDX not applicable
/**
* @struct Attribute
*
* This structure defines a single attribute value. In the case of an array
* attribute, it is the value of one specific element
*/
struct Attribute
{
uint64_t iv_val; // Value of attribute.
uint32_t iv_attrId; // fapi::AttributeId enum value
uint32_t iv_targetType; // fapi::TargetType enum value
uint16_t iv_pos; // For chips/dimms the position
// For chiplets the parent chip position
uint8_t iv_unitPos; // For chiplets the position
uint8_t iv_flags; // fapi::AttributeFlags enum value
uint8_t iv_arrayD1; // Applies to element D1 in 1D or more array atts
uint8_t iv_arrayD2; // Applies to element D2 in 2D or more array atts
uint8_t iv_arrayD3; // Applies to element D3 in 3D or more array atts
uint8_t iv_arrayD4; // Applies to element D4 in 4D array atts
};
/**
* @struct AttributeChunk
*
* This structure defines a chunk of memory containing Attributes. The max chunk
* size is chosen to be reasonable to send over a mailbox type interface
* between subsystems
*/
struct AttributeChunk
{
static const size_t MAX_CHUNK_SIZE_BYTES = 4096;
static const size_t MAX_ATTRS_PER_CHUNK =
MAX_CHUNK_SIZE_BYTES / sizeof(Attribute);
size_t iv_numAttributes; // Number of Attributes in chunk
uint8_t * iv_pAttributes; // Pointer to chunk of memory
};
/**
* @class AttributeTank
*
* This class can be used to store Attributes
*/
class AttributeTank
{
public:
/**
* @brief Allocation types
*/
enum AllocType
{
ALLOC_TYPE_MALLOC = 1,
ALLOC_TYPE_NEW = 2,
};
/**
* @brief Default constructor
*/
AttributeTank();
/**
* @brief Destructor
*/
virtual ~AttributeTank();
/**
* @brief Clear all attributes
*/
virtual void clearAllAttributes();
/**
* @brief Clear any non-const attribute for a specified ID and Target
*
* Note that for array attributes, this clears all values of the array
*
* This is called on an OverrideAttributeTank to clear a non-const
* Attribute Override during FAPI_ATTR_SET
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target (NULL if system)
*/
virtual void clearNonConstAttribute(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget);
/**
* @brief Set an Attribute
*
* Note that for array attributes, this must be called repeatedly, to set
* the attribute value for each element of the array
*
* If the attribute already exists then it is replaced with the new one
*
* This is called on a SyncAttributeTank to save an Attribute for syncing
* during FAPI_ATTR_SET
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target (NULL if system)
* @param[in] i_val Value
* @param[in] i_arrayD1 Array dimension 1 if applicable
* @param[in] i_arrayD2 Array dimension 2 if applicable
* @param[in] i_arrayD3 Array dimension 3 if applicable
* @param[in] i_arrayD4 Array dimension 4 if applicable
*/
virtual void setAttribute(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
const uint64_t i_val,
const uint8_t i_arrayD1 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD2 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD3 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD4 = ATTR_ARRAYD_NA);
/**
* @brief Set an attribute
*
* Note that for array attributes, this must be called repeatedly, to set
* the attribute value for each element of the array
*
* If the attribute already exists then it is replaced with the new one
*
* @param[in] i_attribute Reference to Attribute structure, this is copied
*/
virtual void setAttribute(const Attribute & i_attribute);
/**
* @brief Get a copy of an Attribute
*
* Note that for array attributes, this must be called repeatedly, to query
* the attribute value for each element of the array
*
* This is called on an OverrideAttributeTank to query/get an Attribute
* Override during FAPI_ATTR_GET
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target (NULL if system)
* @param[out] o_val Reference that is filled in with the attr value
* @param[in] i_arrayD1 Array dimension 1 if applicable
* @param[in] i_arrayD2 Array dimension 2 if applicable
* @param[in] i_arrayD3 Array dimension 3 if applicable
* @param[in] i_arrayD4 Array dimension 4 if applicable
*
* return true if attribute exists and a copy was returned.
*/
virtual bool getAttribute(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
uint64_t & o_val,
const uint8_t i_arrayD1 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD2 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD3 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD4 = ATTR_ARRAYD_NA) const;
/**
* @brief Get a copy of all Attributes into newly allocated memory chunks
*
* The use case is for getting the attributes to send across the FSP/
* Hostboot mailbox. Mailbox frees the data memory using free on Hostboot
* and delete[] on FSP.
*
* @param[in] i_allocType Which allocation is used to allocated memory
* @param[out] o_attributes Reference to vector that AttributeChunk structs
* are added to. The caller must free (if MALLOC)
* or delete[] (if NEW) each chunk's memory
*/
virtual void getAllAttributes(
AllocType i_allocType,
std::vector<AttributeChunk> & o_attributes) const;
/**
* @brief Returns if any attributes exist in the tank
*
* This is only expected to be called by unit test
*
* return true if any attributes exist
*/
virtual bool attributesExist();
protected:
// The name of the Tank used in traces, a derived class can set
const char * iv_pName;
private:
// Copy constructor and assignment operator disabled
AttributeTank(const AttributeTank & i_right);
AttributeTank & operator=(const AttributeTank & i_right);
/**
* @brief Returns the Attribute::iv_targetType of the specified Target
*
* @param[in] i_pTarget Pointer to Target
*
* @return uint32_t target-type
*/
static uint32_t getTargetType(const fapi::Target * const i_pTarget);
/**
* @brief Returns the Attribute::iv_pos of the specified Target
*
* @param[in] i_pTarget Pointer to Target
*
* @return uint16_t position
*/
static uint16_t getTargetPos(const fapi::Target * const i_pTarget);
/**
* @brief Returns the Attribute::iv_unitPos of the specified Target
*
* @param[in] i_pTarget Pointer to Target
*
* @return uint8_t unit-position
*/
static uint8_t getTargetUnitPos(const fapi::Target * const i_pTarget);
/**
* @brief Locks the AttributeTank object
*
* Pure virtual function that must be overridden by a concrete derived class
* and implemented by the platform
*/
virtual void platLock() const = 0 ;
/**
* @brief Unlocks the AttributeTank object
*
* Pure virtual function that must be overridden by a concrete derived class
* and implemented by the platform
*/
virtual void platUnlock() const = 0;
// The attributes
// Note: A possible performance boost could be to store the elements in a
// map, the key could be a sub-structure.
bool iv_attributesExist;
std::list<Attribute> iv_attributes;
typedef std::list<Attribute>::iterator AttributesItr_t;
typedef std::list<Attribute>::const_iterator AttributesCItr_t;
};
/**
* @class OverrideAttributeTank
*
* This class can be used to store a set of attribute overrides. It is provided
* to allow a platform to create a singleton Tank for holding overrides
*/
class OverrideAttributeTank : public AttributeTank
{
public:
OverrideAttributeTank();
private:
// Copy constructor and assignment operator disabled
OverrideAttributeTank(const OverrideAttributeTank & i_right);
OverrideAttributeTank & operator=(const OverrideAttributeTank & i_right);
/**
* @brief Locks the OverrideAttributeTank object
*
* Must be implemented by the platform
*/
virtual void platLock() const;
/**
* @brief Unlocks the AttributeTank object
*
* Must be implemented by the platform
*/
virtual void platUnlock() const;
};
/**
* @class SyncAttributeTank
*
* This class can be used to store a set of attributes to sync. It is provided
* to allow a platform to create a singleton Tank for holding attributes to sync
*/
class SyncAttributeTank : public AttributeTank
{
public:
SyncAttributeTank();
/**
* @brief Set an Attribute
*
* This overrides the AttributeTank function, it checks if the platform
* has enabled synchronization before saving the attribute in the tank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target (NULL if system)
* @param[in] i_val Value
* @param[in] i_arrayD1 Array dimension 1 if applicable
* @param[in] i_arrayD2 Array dimension 2 if applicable
* @param[in] i_arrayD3 Array dimension 3 if applicable
* @param[in] i_arrayD4 Array dimension 4 if applicable
*/
virtual void setAttribute(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
const uint64_t i_val,
const uint8_t i_arrayD1 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD2 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD3 = ATTR_ARRAYD_NA,
const uint8_t i_arrayD4 = ATTR_ARRAYD_NA);
/**
* @brief Set an attribute
*
* This overrides the AttributeTank function, it simply calls the base class
* function (needed because the other version of setAttribute was
* overridden)
*
* @param[in] i_attribute Reference to Attribute structure, this is copied
*/
virtual void setAttribute(const Attribute & i_attribute)
{
AttributeTank::setAttribute(i_attribute);
}
private:
// Copy constructor and assignment operator disabled
SyncAttributeTank(const SyncAttributeTank & i_right);
SyncAttributeTank & operator=(const SyncAttributeTank & i_right);
/**
* @brief Checks if the platform has enabled synchronization
*
* Must be implemented by the platform
*/
static bool platSyncEnabled();
/**
* @brief Locks the OverrideAttributeTank object
*
* Must be implemented by the platform
*/
virtual void platLock() const;
/**
* @brief Unlocks the AttributeTank object
*
* Must be implemented by the platform
*/
virtual void platUnlock() const;
};
/**
* @brief This template function gets a 1D array attribute from an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[out] o_1dArray Reference to 1D array where attribute will be copied to
* @return bool True if override was returned
*/
template <typename T, uint8_t SZ1>
bool getAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
T(&o_1dArray)[SZ1])
{
uint64_t l_val = 0;
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1)))
{
// For array attributes, all elements must be overridden
return false;
}
else
{
// Standard conversion converts uint64_t to attribute type
o_1dArray[d1] = l_val;
}
}
return true;
}
/**
* @brief This template function gets a 2D array attribute from an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[out] o_2dArray Reference to 2D array where attribute will be copied to
* @return bool True if override was returned
*/
template <typename T, uint8_t SZ1, uint8_t SZ2>
bool getAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
T(&o_2dArray)[SZ1][SZ2])
{
uint64_t l_val = 0;
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2)))
{
// For array attributes, all elements must be overridden
return false;
}
else
{
// Standard conversion converts uint64_t to attribute type
o_2dArray[d1][d2] = l_val;
}
}
}
return true;
}
/**
* @brief This template function gets a 3D array attribute from an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[out] o_3dArray Reference to 3D array where attribute will be copied to
* @return bool True if override was returned
*/
template <typename T, uint8_t SZ1, uint8_t SZ2, uint8_t SZ3>
bool getAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
T(&o_3dArray)[SZ1][SZ2][SZ3])
{
uint64_t l_val = 0;
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
for (uint8_t d3 = 0; d3 < SZ3; d3++)
{
if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2,
d3)))
{
// For array attributes, all elements must be overridden
return false;
}
else
{
// Standard conversion converts uint64_t to attribute type
o_3dArray[d1][d2][d3] = l_val;
}
}
}
}
return true;
}
/**
* @brief This template function gets a 4D array attribute from an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[out] o_4dArray Reference to 4D array where attribute will be copied to
* @return bool True if override was returned
*/
template <typename T, uint8_t SZ1, uint8_t SZ2, uint8_t SZ3, uint8_t SZ4>
bool getAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
T(&o_4dArray)[SZ1][SZ2][SZ3][SZ4])
{
uint64_t l_val = 0;
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
for (uint8_t d3 = 0; d3 < SZ3; d3++)
{
for (uint8_t d4 = 0; d4 < SZ4; d4++)
{
if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val, d1, d2,
d3, d4)))
{
// For array attributes, all elements must be overridden
return false;
}
else
{
// Standard conversion converts uint64_t to attribute
// type
o_4dArray[d1][d2][d3][d4] = l_val;
}
}
}
}
}
return true;
}
/**
* @brief This template function gets a non-array attribute from an
* AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[out] o_val Reference to variable where attribute will be copied to
* @return bool True if override was returned
*/
template <typename T>
bool getAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
T & o_val)
{
uint64_t l_val = 0;
if (!(i_tank.getAttribute(i_attrId, i_pTarget, l_val)))
{
return false;
}
o_val = static_cast<T>(l_val);
return true;
}
/**
* @brief This template function sets a 1D array attribute into an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[in] i_1dArray Reference to 1D array containing attribute
*/
template <typename T, uint8_t SZ1>
void setAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
const T(&i_1dArray)[SZ1])
{
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
i_tank.setAttribute(i_attrId, i_pTarget, i_1dArray[d1], d1);
}
}
/**
* @brief This template function sets a 2D array attribute into an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[in] i_2dArray Reference to 2D array containing attribute
*/
template <typename T, uint8_t SZ1, uint8_t SZ2>
void setAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
const T(&i_2dArray)[SZ1][SZ2])
{
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
i_tank.setAttribute(i_attrId, i_pTarget, i_2dArray[d1][d2], d1, d2);
}
}
}
/**
* @brief This template function sets a 3D array attribute into an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[in] i_3dArray Reference to 3D array containing attribute
*/
template <typename T, uint8_t SZ1, uint8_t SZ2, uint8_t SZ3>
void setAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
const T(&i_3dArray)[SZ1][SZ2][SZ3])
{
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
for (uint8_t d3 = 0; d3 < SZ3; d3++)
{
i_tank.setAttribute(i_attrId, i_pTarget, i_3dArray[d1][d2][d3],
d1, d2, d3);
}
}
}
}
/**
* @brief This template function sets a 4D array attribute into an AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[in] i_4dArray Reference to 4D array containing attribute
*/
template <typename T, uint8_t SZ1, uint8_t SZ2, uint8_t SZ3, uint8_t SZ4>
void setAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
const T(&i_4dArray)[SZ1][SZ2][SZ3][SZ4])
{
for (uint8_t d1 = 0; d1 < SZ1; d1++)
{
for (uint8_t d2 = 0; d2 < SZ2; d2++)
{
for (uint8_t d3 = 0; d3 < SZ3; d3++)
{
for (uint8_t d4 = 0; d4 < SZ4; d4++)
{
i_tank.setAttribute(i_attrId, i_pTarget,
i_4dArray[d1][d2][d3][d4], d1, d2, d3, d4);
}
}
}
}
}
/**
* @brief This template function sets a non-array attribute into an
* AttributeTank
*
* @param[in] i_attrId Attribute ID
* @param[in] i_pTarget Pointer to Target the attribute is for (NULL if system)
* @param[in] i_tank Reference to AttributeTank
* @param[in] i_val Reference to variable containing attribute
*/
template <typename T>
void setAttributeT(const fapi::AttributeId i_attrId,
const fapi::Target * const i_pTarget,
fapi::AttributeTank & i_tank,
const T & i_val)
{
i_tank.setAttribute(i_attrId, i_pTarget, i_val);
}
} // namespace fapi
#endif // FAPIATTRTANK_H_
|