ASK Modulation

I am trying to write an ASK Modulation block to transmit streams of 0’s
1’s. In order to match the “symbol timing” of the protocol that I am
to implement, would I keep an instance variable in the block that, in
effect, keeps track of how many samples have been processed by the block
far? In other words, using the known sampling frequency and how many
samples have been processed in the block so far, to know whether to go
the next bit to be sent or not.

Also, what is the best way to define what bit sequence I would like to
send? Would it be file_source?

Any other better ways that this can be done? I am brand-new to
but I have gone through most of the GnuRadio tutorial and the “How to
a block” tutorial.

Bill H.