mask value pair

A

aki

Hi folks ,

Though i know what masking means .

But is there something meaningful in writing a mask value pair in a
configuraton file . e.g.

suppressAOa 128,0
where mask is 128 and value is 0.

i assume this mask of 128 (0x80) when used over a variable should
result in 0 for success condition .

My question what is the significance of writing (mask ,value pair) ?
Does value shows the output for success result .


any help in this regards .

Thanks a lot
Aki
 
N

Nick Keighley

Though i know what masking  means .

usually means anding with some value. It usually means some bits are
important in a particular context and some aren't.
But is there something meaningful in writing a mask value pair in a
configuraton file . e.g.

I'm guessing not all bits of the value are significant
suppressAOa  128,0
where mask is 128 and value is 0.

i assume this mask of 128 (0x80) when used over a variable should
result in 0 for success condition .

My question what is the significance of writing (mask ,value pair) ?
Does value shows the output for success result .

to a certain extent this depends on the application. I'd usually
choose 1 to represent success but its up to the designer.

Masks make more sense when there are many things packed in the same
value

count_mask = F0
heartbeat_mask = 01
tx1_mask = 02
tx2_mask = 04
active-mask = 08
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,200
Latest member
LaraHunley

Latest Threads

Top