Reading Gcode in LocalFiileSystem and encodeing int array

MakeSequencer.h

Committer:
satoyuki1111
Date:
2018-10-11
Revision:
3:09ee560a3007
Parent:
2:4fc4593498d7
Child:
4:1e606e2301f9

File content as of revision 3:09ee560a3007:

#ifndef MAKESEQ_H
#define MAKESEQ_H

#include "mbed.h"
#include "string"
#define CODE_LENGTH 100
#define ARRAY_EREMENT 10


class MakeSequencer
{
    public:
    MakeSequencer(FILE *fp);
    
    bool FileOpen();
    void getGcode(int _row,int aSize,int* _array);
    bool ReadGcode();
    int  getGcodeSize();
    
    private:
    char   _buf[256];
    int    _data[ARRAY_EREMENT][CODE_LENGTH];
    int    _codesize;
    
    int    _tempnum[ARRAY_EREMENT];
    int    _ele;
    char   _element[ARRAY_EREMENT][CODE_LENGTH];
    char   _char;
    int    _count;
    bool   _check[ARRAY_EREMENT][CODE_LENGTH];
    
    LocalFileSystem *_local;
    FILE *_fp;
};

#endif