cachemodel_manager.h File Reference
`#include "target_manager.h"`

Go to the source code of this file.

## Data Structures

struct | cachemodel_param
| Cache model parameters. More...
struct | cachemodellist_param
| Cache model list parameters. More...

## Typedefs

typedef struct cachemodel_param | cachemodel_param_t
| Cache model parameters.
typedef struct cachemodellist_param | cachemodellist_param_t
| Cache model list parameters.

## Functions

cachemodellist_param_t * | gene_cachemodellist (void)
| generate a cache model list
cachemodel_param_t * | gene_cachemodel (cachemodellist_param_t *cachemodellist, target_param_t *target, OPJ_BOOL reqJPP)
| generate a cache model under a list
void | print_cachemodel (cachemodel_param_t cachemodel)
| print cache model
cachemodel_param_t * | search_cachemodel (target_param_t *target, cachemodellist_param_t *cachemodellist)
| search a cache model of a target
OPJ_BOOL | is_allsent (cachemodel_param_t cachemodel)
| check if all data has been sent
void | delete_cachemodel (cachemodel_param_t **cachemodel)
| delete a cache model
void | delete_cachemodellist (cachemodellist_param_t **cachemodellist)
| delete cachemodel list

## Typedef Documentation

## cachemodel_param_t

typedef struct cachemodel_param cachemodel_param_t

Cache model parameters.

## cachemodellist_param_t

typedef struct cachemodellist_param cachemodellist_param_t

Cache model list parameters.

## Function Documentation

## delete_cachemodel()

void delete_cachemodel | ( | cachemodel_param_t ** | cachemodel | ) |

delete a cache model

Parameters

  [in] | cachemodel | address of the cachemodel pointer

References logstream, opj_free(), and unrefer_target().

Referenced by delete_cachemodellist(), and delete_msgqueue().

## delete_cachemodellist()

void delete_cachemodellist | ( | cachemodellist_param_t ** | cachemodellist | ) |

delete cachemodel list

Parameters

  [in,out] | cachemodellist | address of the cachemodel list pointer

References delete_cachemodel(), cachemodel_param::next, and opj_free().

Referenced by delete_session(), and delete_sessionlist().

## gene_cachemodel()

cachemodel_param_t * gene_cachemodel | ( | cachemodellist_param_t * | cachemodellist,
|  | target_param_t * | target,
|  | OPJ_BOOL | reqJPP )

generate a cache model under a list

Parameters

  [in] | cachemodellist | cachemodel list to insert the generated cache model, NULL for stateless
  [in] | target | pointer the reference target
  [in] | reqJPP | if JPP-stream is desired true, JPT-stream false

Returns
  pointer to the generated cache model

References target_param::codeidx, SIZmarker_param::Csiz, cachemodellist_param::first, get_m(), get_nmax(), cachemodel_param::jppstream, target_param::jppstream, target_param::jptstream, cachemodellist_param::last, logstream, cachemodel_param::mhead_model, cachemodel_param::next, opj_calloc(), OPJ_FALSE, opj_malloc(), OPJ_TRUE, cachemodel_param::pp_model, index_param::precpacket, refer_target(), index_param::SIZ, cachemodel_param::target, cachemodel_param::th_model, index_param::tilepart, and cachemodel_param::tp_model.

Referenced by gene_JPIPstream(), and open_channel().

## gene_cachemodellist()

cachemodellist_param_t * gene_cachemodellist | ( | void |  | ) |

generate a cache model list

Returns
  pointer to the generated cache model list

References cachemodellist_param::first, cachemodellist_param::last, and opj_malloc().

Referenced by gene_session().

## is_allsent()

OPJ_BOOL is_allsent | ( | cachemodel_param_t | cachemodel | ) |

check if all data has been sent

Parameters

  [in] | cachemodel | cache model

Returns
  true if sent all, false otherwise

References target_param::codeidx, SIZmarker_param::Csiz, get_nmax(), cachemodel_param::jppstream, cachemodel_param::mhead_model, OPJ_FALSE, OPJ_TRUE, cachemodel_param::pp_model, index_param::precpacket, index_param::SIZ, cachemodel_param::target, cachemodel_param::th_model, index_param::tilepart, cachemodel_param::tp_model, SIZmarker_param::XTnum, and SIZmarker_param::YTnum.

## print_cachemodel()

void print_cachemodel | ( | cachemodel_param_t | cachemodel | ) |

print cache model

Parameters

  [in] | cachemodel | cache model

References target_param::codeidx, SIZmarker_param::Csiz, get_nmax(), logstream, cachemodel_param::mhead_model, cachemodel_param::pp_model, index_param::precpacket, index_param::SIZ, cachemodel_param::target, target_param::targetname, cachemodel_param::th_model, index_param::tilepart, cachemodel_param::tp_model, SIZmarker_param::XTnum, and SIZmarker_param::YTnum.

## search_cachemodel()

cachemodel_param_t * search_cachemodel | ( | target_param_t * | target,
|  | cachemodellist_param_t * | cachemodellist )

search a cache model of a target

Parameters

  [in] | target | referring target
  [in] | cachemodellist | cache model list

Returns
  found cache model pointer

References cachemodellist_param::first, cachemodel_param::next, and cachemodel_param::target.

Referenced by open_channel().