P25 Work-in-progress check-in.

This commit is contained in:
dennis.sheirer
2014-11-10 09:53:03 +00:00
parent 7b89c614e7
commit 46e3594c07
31 changed files with 2271 additions and 227 deletions

View File

@@ -48,6 +48,28 @@ public class SyncPatternMatcher
}
}
public SyncPatternMatcher( long sync )
{
mSync = sync;
mMask = getMask( sync );
}
/**
* Generates an all ones mask corresponding to the sync pattern
*/
private static long getMask( long sync )
{
long mask = sync;
for( int x = 1; x < 64; x *= 2 )
{
mask |= ( mask >> x );
}
return mask;
}
public void receive( boolean bit )
{
//Left shift the previous value