Pattern generator for a given length of fixed, random or running byte values
Project description
Pattern Generator V1.0.0
Initial version
Generates a byte array of given length with fixed values, random data or running byte sequence.
A start offset, minimum and maximum value of the running byte sequence can be changed by parameters.
All pattern types support 2 bytes of pattern length in front which can be switched on and off.
Example:
patGen = PatternGenerator()
patGen.set_random(True, 10)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))
patGen.set_value(True, 1024, 0xaa)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))
patGen.set_running_byte(False, True, 1, minValue=0x00, maxValue=0x1F)
for i in range(20):
print("Data",i+1)
data = patGen.get_data_pattern(numData = i+1)
for i in data:
print (hex(i))
V1.0.1
Bugfix: Running byte generator didn't generate a pattern of 128 bytes on special circumstances
Initial version
Generates a byte array of given length with fixed values, random data or running byte sequence.
A start offset, minimum and maximum value of the running byte sequence can be changed by parameters.
All pattern types support 2 bytes of pattern length in front which can be switched on and off.
Example:
patGen = PatternGenerator()
patGen.set_random(True, 10)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))
patGen.set_value(True, 1024, 0xaa)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))
patGen.set_running_byte(False, True, 1, minValue=0x00, maxValue=0x1F)
for i in range(20):
print("Data",i+1)
data = patGen.get_data_pattern(numData = i+1)
for i in data:
print (hex(i))
V1.0.1
Bugfix: Running byte generator didn't generate a pattern of 128 bytes on special circumstances
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Pattern_Generator-1.0.1.tar.gz.
File metadata
- Download URL: Pattern_Generator-1.0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e05a10a3a709286ffbc15924550f642078f94de25ff639e23e4858a721cedc30
|
|
| MD5 |
7fedba72cd83798eb270a1343227462f
|
|
| BLAKE2b-256 |
eb0dbbda1b8a2e774758e624148554d90bdf126b85dd8af7a2909322b5760395
|